[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 8/8] serial logs capture: Detect errors from glob
Empirically, if glob cannot do its work, it sets $! and returns an empty list. Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- Osstest/Serial/sympathy.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Osstest/Serial/sympathy.pm b/Osstest/Serial/sympathy.pm index 84a1e09..7461e07 100644 --- a/Osstest/Serial/sympathy.pm +++ b/Osstest/Serial/sympathy.pm @@ -112,7 +112,10 @@ sub fetch_logs { my %done; for (;;) { my $anydone= 0; - foreach my $logfile (glob $logpat) { + $!=0; + my @logfiles = glob $logpat; + die "$logpat (@logfiles) $!" if $!; + foreach my $logfile (@logfiles) { my $lh= new IO::File $logfile, 'r'; if (!defined $lh) { $!==&ENOENT or warn "$logfile $!"; -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |