mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
when checking filesystem don't stop for missing/corrupt file just print a message
and keep checking.
This commit is contained in:
+8
-4
@@ -39,22 +39,26 @@
|
||||
# Read a manifest generated by fill2fs from the command
|
||||
# line or stdin, checksum every file listed
|
||||
#
|
||||
# $Id$
|
||||
# $Id: fill2fs_check,v 1.1 2001/04/26 23:46:25 ajag Exp ajag $
|
||||
#
|
||||
|
||||
use File::Basename;
|
||||
|
||||
while (<>) {
|
||||
$status = 0;
|
||||
|
||||
file: while (<>) {
|
||||
chomp;
|
||||
if ( ! -e $_) {
|
||||
print "$0: $_ not found\n";
|
||||
exit(1);
|
||||
$status = 1; next file;
|
||||
}
|
||||
(undef, $expected) = split(/\./, basename $_);
|
||||
chomp($sum = `sum -r $_`);
|
||||
($actual) = split(/\s+/, $sum);
|
||||
if ($actual != $expected) {
|
||||
print "$0: checksum is wrong for \"$_\"\n";
|
||||
exit(1);
|
||||
$status = 1; next file;
|
||||
}
|
||||
}
|
||||
|
||||
exit($status);
|
||||
|
||||
Reference in New Issue
Block a user