set file device major/minor to zero (issue #93)

This commit is contained in:
Trammell Hudson 2017-01-28 17:23:29 -05:00
parent 66a663ac00
commit d81073715a
Failed to extract signature

View File

@ -105,8 +105,10 @@ for my $filename (sort keys %entries)
my $d1 = hex substr($md5, 8, 8) ; my $d1 = hex substr($md5, 8, 8) ;
my $d2 = hex substr($md5, 16, 8) ; my $d2 = hex substr($md5, 16, 8) ;
my $d3 = hex substr($md5, 24, 8) ; my $d3 = hex substr($md5, 24, 8) ;
my $hash = sprintf "%08x", $d0 ^ $d1 ^ $d2 ^ $d3;
substr($entry, 6 + 0, 8) = sprintf "%08x", $d0 ^ $d1 ^ $d2 ^ $d3; #warn "$filename: $md5 -> $hash\n";
substr($entry, 6 + 0, 8) = $hash;
# set timestamps to zero # set timestamps to zero
substr($entry, 6 + 40, 8) = $zero; substr($entry, 6 + 40, 8) = $zero;
@ -118,6 +120,10 @@ for my $filename (sort keys %entries)
# zero out the nlinks, since it is managed by the real fs # zero out the nlinks, since it is managed by the real fs
substr($entry, 6 + 32, 8) = $zero; substr($entry, 6 + 32, 8) = $zero;
# set the device major/minor to zero
substr($entry, 6 + 56, 8) = $zero;
substr($entry, 6 + 64, 8) = $zero;
# set check to zero # set check to zero
substr($entry, 6 + 96, 8) = $zero; substr($entry, 6 + 96, 8) = $zero;