]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
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 9625123b8e2163ddef4200df8f4b35ad3c868198..548d496aff90d759eb4dad72b83c6cd9d4e86c90 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 2bd0aa6a31eb19ef36b34a40a163e947354f8169..e0ae3001135c8312bdf68f62ca68cb10518cc068 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 ac09f995add1eb13c5aa87c271e8009ba15a659f..30d14fce3d1c1fc06d3366a529f8d8ba540e03b2 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"])