On Tue, 19 Apr 2005, Derrick J Brashear wrote:

The attached patch adds support for AIX 5.3 to openafs 1.3.81. The only changes are to add a sysname and make the auto*-stuff aware of it.

It seems to work for me on AIX 5.3 Maintenance level 1 using vac.C 6.x.

Caveat: Using JFS2 for the cache most certainly does NOT work, so use either good old JFS or memcache. I suspect that this statement is valid on AIX 5.2 too, so this patch doesn't make the situation worse.

You should be able to provide similar bitching to what exists in afsd to warn people of this, yes?

Something like this? I had to do some additional changes in afsd.c to make it care about the return values, but I suppose that's OK.



/Nikke -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Niklas Edmundsson, Admin @ {acc,hpc2n}.umu.se | [EMAIL PROTECTED] --------------------------------------------------------------------------- With a calendar your days are numbered! =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
diff -x afsconfig.h.in -x configure-libafs -x configure -x aclocal.m4 -x '*.o' 
-wru ../openafs-1.3.81.orig/acinclude.m4 ./acinclude.m4
--- ../openafs-1.3.81.orig/acinclude.m4 2005-04-03 21:32:38.000000000 +0200
+++ ./acinclude.m4      2005-04-19 13:56:37.000000000 +0200
@@ -498,6 +498,10 @@
                        AFS_SYSNAME="rs_aix52"
                        enable_pam="no"
                        ;;
+               power*-ibm-aix5.3*)
+                       AFS_SYSNAME="rs_aix53"
+                       enable_pam="no"
+                       ;;
                x86_64-*-linux-gnu)
                        AFS_SYSNAME="amd64_linuxXX"
                        enable_pam="no"
diff -x afsconfig.h.in -x configure-libafs -x configure -x aclocal.m4 -x '*.o' 
-wru ../openafs-1.3.81.orig/src/afsd/afsd.c ./src/afsd/afsd.c
--- ../openafs-1.3.81.orig/src/afsd/afsd.c      2005-04-03 20:15:41.000000000 
+0200
+++ ./src/afsd/afsd.c   2005-04-20 13:47:02.000000000 +0200
@@ -333,8 +333,7 @@
   *    Sets globals.
   
*---------------------------------------------------------------------------*/
 
-int
-ParseCacheInfoFile()
+int ParseCacheInfoFile(void)
 {
     static char rn[] = "ParseCacheInfoFile";   /*This routine's name */
     FILE *cachefd;             /*Descriptor for cache info file */
@@ -396,8 +395,9 @@
            ("\tcacheMountDir: '%s'\n\tcacheBaseDir: '%s'\n\tcacheBlocks: %d\n",
             tmd, tbd, tCacheBlocks);
     }
-    if (!(cacheFlags & AFSCALL_INIT_MEMCACHE))
-       PartSizeOverflow(tbd, cacheBlocks);
+    if (!(cacheFlags & AFSCALL_INIT_MEMCACHE)) {
+       return(PartSizeOverflow(tbd, cacheBlocks));
+    }
 
     return (0);
 }
@@ -407,10 +407,12 @@
  * isn't a mounted partition it's also ignored since we can't guarantee 
  * what will be stored afterwards. Too many if's. This is now purely
  * advisory. ODS with over 2G partition also gives warning message.
+ *
+ * Returns:
+ *     0 if everything went well,
+ *     1 otherwise.
  */
-PartSizeOverflow(path, cs)
-     char *path;
-     int cs;
+int PartSizeOverflow(char *path, int cs)
 {
     int bsize = -1, totalblks, mint;
 #if AFS_HAVE_STATVFS
@@ -425,7 +427,15 @@
     }
     totalblks = statbuf.f_blocks;
     bsize = statbuf.f_frsize;
-#else
+#if AFS_AIX51_ENV
+    if(strcmp(statbuf.f_basetype, "jfs")) {
+        fprintf(stderr, "Cache filesystem '%s' must be jfs (now %s)\n",
+                path, statbuf.f_basetype);
+        return 1;
+    }
+#endif /* AFS_AIX51_ENV */
+
+#else /* AFS_HAVE_STATVFS */
     struct statfs statbuf;
 
     if (statfs(path, &statbuf) < 0) {
@@ -453,7 +463,10 @@
        printf
            ("Cache size (%d) must be less than 95%% of partition size (which 
is %d). Lower cache size\n",
             cs, mint);
+        return 1;
     }
+
+    return 0;
 }
 
 /*-----------------------------------------------------------------------------
diff -x afsconfig.h.in -x configure-libafs -x configure -x aclocal.m4 -x '*.o' 
-wru ../openafs-1.3.81.orig/src/cf/osconf.m4 ./src/cf/osconf.m4
--- ../openafs-1.3.81.orig/src/cf/osconf.m4     2005-04-03 22:01:13.000000000 
+0200
+++ ./src/cf/osconf.m4  2005-04-19 13:51:08.000000000 +0200
@@ -491,6 +491,22 @@
                SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
                AIX64=""
                ;;
+
+       rs_aix53)       
+               DBG="-g"
+               LEX="lex"
+               LIBSYS_AIX_EXP="afsl.exp"
+               MT_CC="xlc_r"
+               MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
+               MT_LIBS="-lpthreads"
+               SHLIB_SUFFIX="o"
+               TXLIBS="-lcurses"
+               XCFLAGS="-K -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void"
+               XLIBS="${LIB_AFSDB} -ldl"
+               SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
+               AIX64=""
+               ;;
+
        s390_linux22)
                CC="gcc"
                CCOBJ="gcc"
diff -x afsconfig.h.in -x configure-libafs -x configure -x aclocal.m4 -x '*.o' 
-wru ../openafs-1.3.81.orig/src/config/afs_sysnames.h 
./src/config/afs_sysnames.h
--- ../openafs-1.3.81.orig/src/config/afs_sysnames.h    2005-04-03 
22:01:14.000000000 +0200
+++ ./src/config/afs_sysnames.h 2005-04-19 13:51:43.000000000 +0200
@@ -67,6 +67,7 @@
 #define SYS_NAME_ID_rs_aix51            704
 #define SYS_NAME_ID_rs_aix43            705
 #define SYS_NAME_ID_rs_aix52            706
+#define SYS_NAME_ID_rs_aix53            707
 
 #define SYS_NAME_ID_sun3_411            906
 #define SYS_NAME_ID_sun3x_411           912
diff -x afsconfig.h.in -x configure-libafs -x configure -x aclocal.m4 -x '*.o' 
-wru ../openafs-1.3.81.orig/src/libafs/MakefileProto.AIX.in 
./src/libafs/MakefileProto.AIX.in
--- ../openafs-1.3.81.orig/src/libafs/MakefileProto.AIX.in      2004-06-21 
21:53:07.000000000 +0200
+++ ./src/libafs/MakefileProto.AIX.in   2005-04-19 13:54:20.000000000 +0200
@@ -70,7 +70,7 @@
 
 <rs_aix42>
 KMODS=32 
-<rs_aix50 rs_aix51 rs_aix52>
+<rs_aix50 rs_aix51 rs_aix52 rs_aix53>
 KMODS=32 64
 <all>
 

Reply via email to