Skip to content

Commit

Permalink
Merge pull request #314 from drivenet/fix/missing-map-handling
Browse files Browse the repository at this point in the history
Try to fix "Use of uninitialized value $sdev in right bitshift"
  • Loading branch information
liske authored Nov 17, 2024
2 parents 9f601d7 + 59492c9 commit 6292d6d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions needrestart
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,12 @@ 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;
}
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 6292d6d

Please sign in to comment.