From: Nathan Scott Date: Fri, 30 Apr 2004 02:58:44 +0000 (+0000) Subject: Update user/kernel source checker to work better with separate user/kernel trees. X-Git-Tag: v1.1.0~845 X-Git-Url: http://git.apps.os.sepia.ceph.com/?p=xfstests-dev.git;a=commitdiff_plain;h=2765c8a3f8e7b43723cef11f04907ea64bd88620 Update user/kernel source checker to work better with separate user/kernel trees. --- diff --git a/tools/srcdiff b/tools/srcdiff index b1aad516..e825a604 100755 --- a/tools/srcdiff +++ b/tools/srcdiff @@ -31,6 +31,11 @@ my $xdiff = $ENV{'XDIFF'}; my $quiet = 0; my $usage = 0; +if ( ! -f "$kworkarea/xfs_fs.h" ) { + $kworkarea .= '/fs/xfs'; + die "Cannot find XFS in KWORKAREA" unless -f "$kworkarea/xfs_fs.h"; +} + foreach (@ARGV) { if (/^-q$/) { $quiet++; @@ -102,10 +107,10 @@ foreach (@pkglist) { } print "\n=== Checking headers ===\n"; foreach (@difflist) { - straightdiff $_, 'xfsprogs/include', "$kworkarea/fs/xfs"; + straightdiff $_, 'xfsprogs/include', "$kworkarea"; } -straightdiff 'dmapi_kern.h', 'dmapi/include', "$kworkarea/fs/xfs/dmapi"; -straightdiff 'dmapi.h', 'dmapi/include', "$kworkarea/fs/xfs/dmapi"; +straightdiff 'dmapi_kern.h', 'dmapi/include', "$kworkarea/dmapi"; +straightdiff 'dmapi.h', 'dmapi/include', "$kworkarea/dmapi"; # # setstate @@ -284,7 +289,7 @@ my @funclist = qw( print "\n=== Checking libxfs code ===\n"; foreach (@funclist) { - functiondiff $_, 'xfsprogs/libxfs', "$kworkarea/fs/xfs"; + functiondiff $_, 'xfsprogs/libxfs', "$kworkarea"; } print "\n=== Checking libxlog code ===\n"; -functiondiff 'xfs_log_recover.c', 'xfsprogs/libxlog', "$kworkarea/fs/xfs"; +functiondiff 'xfs_log_recover.c', 'xfsprogs/libxlog', "$kworkarea";