From 2ce28370cf2d3a16d84664463731b1148447edb0 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Tue, 27 Apr 2010 18:57:30 +0100 Subject: [PATCH] Linux: Don't preprocess osi_vfs.h Before we did inodes properly, we needed to pre-process osi_vfs.h, in order to merge our inode structure with the Linux one. Ever since we moved to native inodes, that preprocessing has been disabled, and we've just copied osi_vfs.hin to osf_vfs.h Skip this pointless step, permanently rename osi_vfs.hin to osi_vfs.h, and remove the unused support scripts. Change-Id: I5e21eccf2242080cd8b994bd1654260bfb531420 Reviewed-on: http://gerrit.openafs.org/1856 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- acinclude.m4 | 4 - configure-libafs.in | 1 - src/afs/LINUX/.gitignore | 5 - src/afs/LINUX/{osi_vfs.hin => osi_vfs.h} | 2 +- src/afs/LINUX24/{osi_vfs.hin => osi_vfs.h} | 2 +- src/cf/linux-test2.m4 | 14 --- src/config/libafsdep | 1 - src/config/make_vnode.pl | 119 --------------------- 8 files changed, 2 insertions(+), 146 deletions(-) delete mode 100644 src/afs/LINUX/.gitignore rename src/afs/LINUX/{osi_vfs.hin => osi_vfs.h} (99%) rename src/afs/LINUX24/{osi_vfs.hin => osi_vfs.h} (99%) delete mode 100644 src/cf/linux-test2.m4 delete mode 100644 src/config/make_vnode.pl diff --git a/acinclude.m4 b/acinclude.m4 index 54f4e9fc2..67a3aa23c 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -787,10 +787,6 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) OPENAFS_GCC_SUPPORTS_NO_COMMON OPENAFS_GCC_SUPPORTS_PIPE AC_SUBST(LINUX_GCC_KOPTS) - ifdef([OPENAFS_CONFIGURE_LIBAFS], - [LINUX_BUILD_VNODE_FROM_INODE(src/config,src/afs)], - [LINUX_BUILD_VNODE_FROM_INODE(${srcdir}/src/config,src/afs/LINUX,${srcdir}/src/afs/LINUX)] - ) LINUX_KBUILD_USES_EXTRA_CFLAGS LINUX_KERNEL_COMPILE_WORKS diff --git a/configure-libafs.in b/configure-libafs.in index 224209887..f1c069320 100644 --- a/configure-libafs.in +++ b/configure-libafs.in @@ -10,7 +10,6 @@ AC_SUBST(MACOS_VERSION) AC_SUBST(LINUX_PKGVER) AC_SUBST(LINUX_PKGREL) -define(OPENAFS_CONFIGURE_LIBAFS) AC_PROG_CC OPENAFS_CONFIGURE_COMMON diff --git a/src/afs/LINUX/.gitignore b/src/afs/LINUX/.gitignore deleted file mode 100644 index 21263a094..000000000 --- a/src/afs/LINUX/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# After changing this file, please run -# git ls-files -i --exclude-standard -# to check that you haven't inadvertently ignored any tracked files. - -/osi_vfs.h diff --git a/src/afs/LINUX/osi_vfs.hin b/src/afs/LINUX/osi_vfs.h similarity index 99% rename from src/afs/LINUX/osi_vfs.hin rename to src/afs/LINUX/osi_vfs.h index 8d163e587..f771dad38 100644 --- a/src/afs/LINUX/osi_vfs.hin +++ b/src/afs/LINUX/osi_vfs.h @@ -1,7 +1,7 @@ /* * Copyright 2000, International Business Machines Corporation and others. * All Rights Reserved. - * + * * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html diff --git a/src/afs/LINUX24/osi_vfs.hin b/src/afs/LINUX24/osi_vfs.h similarity index 99% rename from src/afs/LINUX24/osi_vfs.hin rename to src/afs/LINUX24/osi_vfs.h index bd6de5364..97b1254b3 100644 --- a/src/afs/LINUX24/osi_vfs.hin +++ b/src/afs/LINUX24/osi_vfs.h @@ -1,7 +1,7 @@ /* * Copyright 2000, International Business Machines Corporation and others. * All Rights Reserved. - * + * * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html diff --git a/src/cf/linux-test2.m4 b/src/cf/linux-test2.m4 deleted file mode 100644 index 491e894f7..000000000 --- a/src/cf/linux-test2.m4 +++ /dev/null @@ -1,14 +0,0 @@ -dnl LINUX_BUILD_VNODE_FROM_INODE (configdir, outputdir, tmpldir) -dnl defaults: (src/config, src/afs/LINUX, src/afs/linux) - -AC_DEFUN([LINUX_BUILD_VNODE_FROM_INODE], [ -AC_MSG_CHECKING(whether to build osi_vfs.h) -configdir=ifelse([$1], ,[src/config],$1) -outputdir=ifelse([$2], ,[src/afs/LINUX],$2) -tmpldir=ifelse([$3], ,[src/afs/LINUX],$3) -mkdir -p $outputdir -cp $tmpldir/osi_vfs.hin $outputdir/osi_vfs.h -# chmod +x $configdir/make_vnode.pl -# $configdir/make_vnode.pl -i $LINUX_KERNEL_PATH -t ${tmpldir} -o $outputdir - AC_MSG_RESULT(yes) -]) diff --git a/src/config/libafsdep b/src/config/libafsdep index 0fdf4cd9e..68e39bb46 100644 --- a/src/config/libafsdep +++ b/src/config/libafsdep @@ -1,4 +1,3 @@ -make_vnode.pl Makefile.config.in Makefile.version-NOCML.in afsconfig.h.in diff --git a/src/config/make_vnode.pl b/src/config/make_vnode.pl deleted file mode 100644 index 8fc19a922..000000000 --- a/src/config/make_vnode.pl +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/perl -# -# Make VNODE structure from INODE structure -# -# Created By: Derek Atkins -# -use File::Path; - -$linux_header_dir="/usr/src/linux"; -$outdir="./src/afs/LINUX"; -$tmpldir="./src/afs/LINUX"; - -$sepline="/* LINUX VNODE INCLUDED BELOW -- DO NOT MODIFY */\n"; - -# makeVfs (fs.h, vfs.hin, vfs.out) -sub makeVfs { - my ($in,$base,$out) = @_; - my ($seplinefound); - - open (IN, "$in") || die "Cannot open $in for reading"; - open (BASE, "$base" ) || die "Cannot open base file $base"; - open (OUT, ">$out") || die "Cannot open tempfile $out"; - - while () { - print OUT; - if ($_ eq $sepline) { - $seplinefound = 1; - last; - } - } - - print OUT $sepline if !$seplinefound; - - my ($state) = 0; - while () { - - # Look for 'struct inode' definition - if ($state == 0) { - next unless m/^struct\s+inode\s*\{/; - $state++; - s/inode/vnode/; - # Fallthrough - } - - # Look for 'union {' -- print otherwise - if ($state == 1) { - if (m/^\s*union\s*\{/) { - $state++; - print OUT "#ifdef notdef\n"; - } - print OUT; - next; - } - - # Look for the end of the union -- ignore otherwise - if ($state == 2) { - print OUT; - next unless (m/^\s+\}\s*u;/); - $state++; - print OUT "#endif /* notdef */\n"; - next; - } - - # Look for end brace -- print until we find it - if ($state == 3) { - print OUT; - if (m/^\s*\};/) { $state++ } - } - } - - while () { print OUT; } - - close (IN); - close (BASE); - close (OUT); -} - -sub usage { - print "usage: $0 [-i linux_header_dir] [-o output_dir] [-h]\n"; - exit 1; -} - -sub testArg { - my ($arg) = @_; - return $arg if ($arg && $arg ne ""); - usage; -} - -while ($_ = shift @ARGV) { - if (m/^-i/) { $linux_header_dir = testArg(shift @ARGV); next; } - if (m/^-o/) { $outdir = testArg(shift @ARGV); next; } - if (m/^-t/) { $tmpldir = testArg(shift @ARGV); next; } - usage; -} - -$linux_fs_h="$linux_header_dir/include/linux/fs.h"; -$vfs_h="$outdir/osi_vfs.h"; -$vfs_hin="$tmpldir/osi_vfs.hin"; - -# we're running prior to configure finishing, so outdir might not exist yet -mkpath([$outdir], 0, 0755); - -makeVfs ($linux_fs_h, $vfs_hin, "$vfs_h.new"); - -system ("cmp", "-s", $vfs_h, "$vfs_h.new"); -$exit_value = $? >> 8; -$signal_num = $? & 127; -$core_dump = $? & 128; - -if ($exit_value == 0 || $signal_num > 0) { - unlink "$vfs_h.new"; - print "nothing to do... $vfs_h not changed.\n" -} else { - unlink "$vfs_h"; - rename ("$vfs_h.new", $vfs_h); - print "wrote $vfs_h\n"; -} - -exit 0; -- 2.39.5