Skip to content

Commit ed409ca

Browse files
committed
reset nlinks as well since /dev was changing due to serial adapter hotplug
1 parent 21268a4 commit ed409ca

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

cpio-clean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# File timestamp is set to 1970-01-01T00:00:00
88
# uid/gid are set to root
99
# check field is zeroed
10+
# nlinks is set to zero, since the filesystem manages it
1011
#
1112
use warnings;
1213
use strict;
@@ -114,6 +115,9 @@ for my $filename (sort keys %entries)
114115
substr($entry, 6 + 16, 8) = $zero;
115116
substr($entry, 6 + 24, 8) = $zero;
116117

118+
# zero out the nlinks, since it is managed by the real fs
119+
substr($entry, 6 + 32, 8) = $zero;
120+
117121
# set check to zero
118122
substr($entry, 6 + 96, 8) = $zero;
119123

0 commit comments

Comments
 (0)