linux-fs-h-struct-inode-test-for-i-cdev-20010807
authorDerrick Brashear <shadow@dementia.org>
Wed, 8 Aug 2001 01:34:58 +0000 (01:34 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 8 Aug 2001 01:34:58 +0000 (01:34 +0000)
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

acconfig.h
configure.in
src/afs/LINUX/osi_vfs.h
src/cf/linux-test4.m4 [new file with mode: 0644]

index 9625123..548d496 100644 (file)
@@ -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 */
index 2bd0aa6..e0ae300 100644 (file)
@@ -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
index ac09f99..30d14fc 100644 (file)
@@ -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 (file)
index 0000000..1755b31
--- /dev/null
@@ -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 <linux/fs.h>],
+[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"])