From: Derrick Brashear Date: Wed, 8 Aug 2001 01:34:58 +0000 (+0000) Subject: linux-fs-h-struct-inode-test-for-i-cdev-20010807 X-Git-Tag: BP-openafs-stable-1_2_x~63 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=81c57416335b9d65a467ffb12565ad90d890b815;p=packages%2Fo%2Fopenafs.git linux-fs-h-struct-inode-test-for-i-cdev-20010807 doesn't look like it should matter but we might as well try to stay consistent ==================== This delta was composed from multiple commits as part of the CVS->Git migration. The checkin message with each commit was inconsistent. The following are the additional commit messages. ==================== remove extra tests --- diff --git a/acconfig.h b/acconfig.h index 9625123b8..548d496af 100644 --- a/acconfig.h +++ b/acconfig.h @@ -30,6 +30,7 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg } #undef INODE_SETATTR_NOT_VOID #undef STRUCT_INODE_HAS_I_BYTES +#undef STRUCT_INODE_HAS_I_CDEV #undef STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK /* glue for RedHat kernel bug */ diff --git a/configure.in b/configure.in index 2bd0aa6a3..e0ae30011 100644 --- a/configure.in +++ b/configure.in @@ -111,12 +111,16 @@ case $system in if test "x$enable_kernel_module" = "xyes"; then LINUX_FS_STRUCT_INODE_HAS_I_BYTES LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK + LINUX_FS_STRUCT_INODE_HAS_I_CDEV LINUX_INODE_SETATTR_RETURN_TYPE LINUX_NEED_RHCONFIG LINUX_WHICH_MODULES if test "x$ac_cv_linux_func_inode_setattr_returns_int" = "xyes" ; then AC_DEFINE(INODE_SETATTR_NOT_VOID) fi + if test "x$ac_cv_linux_fs_struct_inode_has_i_cdev" = "xyes"; then + AC_DEFINE(STRUCT_INODE_HAS_I_CDEV) + fi if test "x$ac_cv_linux_fs_struct_inode_has_i_bytes" = "xyes"; then AC_DEFINE(STRUCT_INODE_HAS_I_BYTES) fi diff --git a/src/afs/LINUX/osi_vfs.h b/src/afs/LINUX/osi_vfs.h index ac09f995a..30d14fce3 100644 --- a/src/afs/LINUX/osi_vfs.h +++ b/src/afs/LINUX/osi_vfs.h @@ -81,6 +81,9 @@ typedef struct vnode { #if defined(AFS_LINUX24_ENV) struct pipe_inode_info *i_pipe; struct block_device *i_bdev; +#if defined(STRUCT_INODE_HAS_I_CDEV) + struct char_device *i_cdev; +#endif unsigned long i_dnotify_mask; struct dnotify_struct *i_dnotify; #endif diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4 new file mode 100644 index 000000000..1755b3187 --- /dev/null +++ b/src/cf/linux-test4.m4 @@ -0,0 +1,14 @@ +AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_CDEV, [ +AC_MSG_CHECKING(for i_cdev in struct inode) +save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" +AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_cdev, +[ +AC_TRY_COMPILE( +[#include ], +[struct inode _inode; +printf("%d\n", _inode.i_cdev);], +ac_cv_linux_fs_struct_inode_has_i_cdev=yes, +ac_cv_linux_fs_struct_inode_has_i_cdev=no)]) +AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_cdev) +CPPFLAGS="$save_CPPFLAGS"])