|
|
| File: [Development] / xfs-cmds / xfstests / src / fill2fs_check (download)
Revision 1.8, Wed Nov 9 02:50:19 2005 UTC (11 years, 11 months ago) by nathans.longdrop.melbourne.sgi.com
Update copyright annotations and license boilerplates to correspond with SGI Legals preferences. Merge of master-melb:xfs-cmds:24329a by kenmcd. |
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
#
# fill2fs_check:
# Read a manifest generated by fill2fs from the command
# line or stdin, checksum every file listed
#
# $Id: fill2fs_check,v 1.1 2001/04/26 23:46:25 ajag Exp ajag $
#
use File::Basename;
$status = 0;
file: while (<>) {
chomp;
if ( ! -e $_) {
print "$0: $_ not found\n";
$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";
$status = 1; next file;
}
}
exit($status);