[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 01/16] scripts/get_maintainer.pl: Print proper error
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 01/16] scripts/get_maintainer.pl: Print proper error message for missing $file |
Date: |
Mon, 26 Mar 2018 15:36:28 +0200 |
From: Ian Jackson <address@hidden>
If you pass scripts/get_maintainer.pl the name of a FIFO or other
exciting object (/dev/stdin, for example), it would falsely print
"file not found". Instead: stat the object rather than using -f so
that we do not mind if the object is not a file; and print the errno
value in the error message.
Signed-off-by: Ian Jackson <address@hidden>
CC: Thomas Huth <address@hidden>
CC: Paolo Bonzini <address@hidden>
CC: Stefano Stabellini <address@hidden>
CC: Anthony PERARD <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Ian Jackson <address@hidden>
---
scripts/get_maintainer.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 07369aa..43fb5f5 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -381,8 +381,8 @@ foreach my $file (@ARGV) {
##if $file is a directory and it lacks a trailing slash, add one
if ((-d $file)) {
$file =~ s@([^/])address@hidden/@;
- } elsif (!(-f $file)) {
- die "$P: file '${file}' not found\n";
+ } elsif (!(stat $file)) {
+ die "$P: file '${file}' not found: $!\n";
}
}
if ($from_filename) {
--
1.8.3.1
- [Qemu-devel] [PULL 00/16] Misc fixes for QEMU 2.12.0-rc1, Paolo Bonzini, 2018/03/26
- [Qemu-devel] [PULL 02/16] WHPX fix WHvGetCapability out WrittenSizeInBytes, Paolo Bonzini, 2018/03/26
- [Qemu-devel] [PULL 03/16] WHPX fix WHvSetPartitionProperty in PropertyCode, Paolo Bonzini, 2018/03/26
- [Qemu-devel] [PULL 04/16] WHPX improve vcpu_post_run perf, Paolo Bonzini, 2018/03/26
- [Qemu-devel] [PULL 05/16] hw/net/can: Fix segfaults when using the devices without bus, Paolo Bonzini, 2018/03/26
- [Qemu-devel] [PULL 01/16] scripts/get_maintainer.pl: Print proper error message for missing $file,
Paolo Bonzini <=
- [Qemu-devel] [PULL 07/16] hw/audio: Fix crashes when devices are used on ISA bus without DMA, Paolo Bonzini, 2018/03/26
- [Qemu-devel] [PULL 06/16] fdc: Exit if ISA controller does not support DMA, Paolo Bonzini, 2018/03/26
- [Qemu-devel] [PULL 08/16] scripts/device-crash-test: Remove fixed isapc-with-iommu entry, Paolo Bonzini, 2018/03/26
- [Qemu-devel] [PULL 09/16] vhost-user-test: do not hang if chardev creation failed, Paolo Bonzini, 2018/03/26
- [Qemu-devel] [PULL 11/16] tcg: Really fix cpu_io_recompile, Paolo Bonzini, 2018/03/26
- [Qemu-devel] [PULL 12/16] chardev-socket: remove useless if, Paolo Bonzini, 2018/03/26
- [Qemu-devel] [PULL 13/16] scsi: turn "is this a SCSI device?" into a conditional hint, Paolo Bonzini, 2018/03/26
- [Qemu-devel] [PULL 14/16] iothread: fix breakage on windows, Paolo Bonzini, 2018/03/26