Skip to content

Commit

Permalink
[Core] Improve handling of failed stat calls on mapped files.
Browse files Browse the repository at this point in the history
  • Loading branch information
liske committed Nov 17, 2024
1 parent 6292d6d commit add9dc0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions needrestart
Original file line number Diff line number Diff line change
Expand Up @@ -574,11 +574,9 @@ if(defined($opt_l)) {
# get on-disk info
my ($sdev, $sinode) = stat($testp);
unless($sdev) {
unless($nrconf{skip_mapfiles} == -1) {
print STDERR "$LOGPREF #$pid map stat for $testp failed: $!\n" if($nrconf{verbosity} > 1);
}
next;
}
print STDERR "$LOGPREF #$pid map stat for $testp failed: $!\n" if($nrconf{skip_mapfiles} == 0 && $nrconf{verbosity} > 1);
next;
}
my @sdevs = (
# glibc gnu_dev_* definition from sysmacros.h
sprintf("%02x:%02x", (($sdev >> 8) & 0xfff) | (($sdev >> 32) & ~0xfff), (($sdev & 0xff) | (($sdev >> 12) & ~0xff))),
Expand Down

0 comments on commit add9dc0

Please sign in to comment.