From 446457a1240b88fd94fc34ff5715f2b7f2f3ef12 Mon Sep 17 00:00:00 2001 From: Cheyenne Wills Date: Mon, 27 Jul 2020 12:31:03 -0600 Subject: [PATCH] afs: Set AFS_VFSFSID to a numerical value Currently when UKERNEL is defined, AFS_VFSFSID is always set to AFS_MOUNT_AFS, which is a string for many platforms for UKERNEL. Update src/afs/afs.h to insure that the define for AFS_VFSFSID is a numeric value when building UKERNEL. Clean up the preprocessor indentation in src/afs/afs.h in the area around the AFS_VFSFSID defines. Thanks to adeason@sinenomine.net for pointing out a much easier solution for resolving this problem. Change-Id: I618fc4c89029a6cca2ca6f530b8f65399299a9d1 Reviewed-on: https://gerrit.openafs.org/14279 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Benjamin Kaduk --- src/afs/afs.h | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/afs/afs.h b/src/afs/afs.h index 8d9dd67e2f..407eb89024 100644 --- a/src/afs/afs.h +++ b/src/afs/afs.h @@ -46,14 +46,19 @@ extern enum afs_shutdown_state afs_shuttingdown; * Macros to uniquely identify the AFS vfs struct */ #define AFS_VFSMAGIC 0x1234 -#if defined(AFS_SUN5_ENV) || defined(AFS_HPUX90_ENV) || defined(AFS_LINUX20_ENV) -#define AFS_VFSFSID 99 + +#if defined(UKERNEL) +# if defined(AFS_USR_AIX_ENV) || defined(AFS_USR_SGI_ENV) +# define AFS_VFSFSID AFS_MOUNT_AFS +# else +# define AFS_VFSFSID 99 +# endif +#elif defined(AFS_SUN5_ENV) || defined(AFS_HPUX90_ENV) || defined(AFS_LINUX20_ENV) +# define AFS_VFSFSID 99 +#elif defined(AFS_SGI_ENV) +# define AFS_VFSFSID afs_fstype #else -#if defined(AFS_SGI_ENV) -#define AFS_VFSFSID afs_fstype -#else -#define AFS_VFSFSID AFS_MOUNT_AFS -#endif +# define AFS_VFSFSID AFS_MOUNT_AFS #endif /* use this value for reporting total space, free space, etc. * fake a high number to satisfy programs that use the statfs call to make sure