LINUX: Keyring deal with suse-specific key_type op
authorChristof Hanke <christof.hanke@rzg.mpg.de>
Thu, 12 Sep 2013 07:25:31 +0000 (09:25 +0200)
committerDerrick Brashear <shadow@your-file-system.com>
Fri, 13 Sep 2013 13:10:16 +0000 (06:10 -0700)
instantiate_prep used for checking for
STRUCT_KEY_TYPE_HAS_PREPARSE

Change-Id: Ia7411e85467ba418dfefa5cd7c2d570fe20a5a68
Reviewed-on: http://gerrit.openafs.org/10194
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

acinclude.m4
src/afs/LINUX/osi_groups.c

index ddda7f8..d9f5baa 100644 (file)
@@ -849,6 +849,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 AC_CHECK_LINUX_STRUCT([filename], [name], [fs.h])
                 AC_CHECK_LINUX_STRUCT([inode_operations], [truncate], [fs.h])
                 AC_CHECK_LINUX_STRUCT([key_type], [preparse], [key-type.h])
+                AC_CHECK_LINUX_STRUCT([key_type], [instantiate_prep], [key-type.h])
                 AC_CHECK_LINUX_STRUCT([nameidata], [path], [namei.h])
                 AC_CHECK_LINUX_STRUCT([proc_dir_entry], [owner], [proc_fs.h])
                 AC_CHECK_LINUX_STRUCT([super_block], [s_bdi], [fs.h])
index cc48f6c..9916d2b 100644 (file)
@@ -520,7 +520,12 @@ struct key_type key_type_afs_pag =
 {
     .name        = "afs_pag",
     .describe    = afs_pag_describe,
+#if defined(STRUCT_KEY_TYPE_HAS_INSTANTIATE_PREP)
+    .instantiate_prep = afs_pag_instantiate,
+    .instantiate = NULL,
+#else
     .instantiate = afs_pag_instantiate,
+#endif
     .match       = afs_pag_match,
     .destroy     = afs_pag_destroy,
 };