solaris8-dont-read-binding-file-20030513
[openafs.git] / src / afs / SOLARIS / osi_vfsops.c
index 8a30878..5cf3c15 100644 (file)
  * osi_vfsops.c for SOLARIS
  */
 #include <afsconfig.h>
-#include "../afs/param.h"
+#include "afs/param.h"
 
 RCSID("$Header$");
 
-#include "../afs/sysincludes.h"        /* Standard vendor system headers */
-#include "../afs/afsincludes.h"        /* Afs-based standard headers */
-#include "../afs/afs_stats.h"   /* statistics stuff */
-#include "../h/modctl.h"
-#include "../h/syscall.h"
+#include "afs/sysincludes.h"   /* Standard vendor system headers */
+#include "afsincludes.h"       /* Afs-based standard headers */
+#include "afs/afs_stats.h"   /* statistics stuff */
+#include "h/modctl.h"
+#include "h/syscall.h"
 #include <sys/kobj.h>
 
 
@@ -118,8 +118,7 @@ int afs_root (struct vfs *afsp, struct vnode **avpp)
 
        if (!(code = afs_InitReq(&treq, proc->p_cred)) &&
            !(code = afs_CheckInit())) {
-           tvp = afs_GetVCache(&afs_rootFid, &treq, (afs_int32 *)0,
-                               (struct vcache*)0, WRITE_LOCK);
+           tvp = afs_GetVCache(&afs_rootFid, &treq, NULL, NULL);
            /* we really want this to stay around */
            if (tvp) {
                afs_globalVp = tvp;
@@ -437,7 +436,7 @@ _init()
         printf("misc/nfssrv module must be loaded before loading afs with nfs-xlator\n");
         return (ENOSYS);
     }
-#else
+#else /* !AFS_SUN55_ENV */
 #if    defined(AFS_SUN52_ENV)
     if ((!(mp = mod_find_by_filename("fs", "nfs")) && 
        !(mp = mod_find_by_filename(NULL, "/kernel/fs/nfs")) &&
@@ -446,9 +445,10 @@ _init()
        printf("fs/nfs module must be loaded before loading afs with nfs-xlator\n");
        return (ENOSYS);
     }
-#endif
-#endif
-#endif
+#endif /* AFS_SUN52_ENV */
+#endif /* AFS_SUN55_ENV */
+#endif /* !AFS_NONFSTRANS */
+#if !defined(AFS_SUN58_ENV)
     /* 
      * Re-read the /etc/name_to_sysnum file to make sure afs isn't added after
      * reboot.  Ideally we would like to call modctl_read_sysbinding_file() but
@@ -461,14 +461,12 @@ _init()
 #ifdef AFS_SUN53_ENV
 #ifndef        SYSBINDFILE
 #define        SYSBINDFILE     "/etc/name_to_sysnum"
-#endif
+#endif /* SYSBINDFILE */
     read_binding_file(SYSBINDFILE, sb_hashtab);
-#else
+#else /* !AFS_SUN53_ENV */
     read_binding_file(sysbind, sb_hashtab);
-#endif
-#if !defined(AFS_SUN58_ENV)
+#endif /* AFS_SUN53_ENV */
     make_syscallname("afs", AFS_SYSCALL);
-#endif
 
     if (sysent[AFS_SYSCALL].sy_call == nosys) {
        if ((sysn = mod_getsysname(AFS_SYSCALL)) != NULL) {
@@ -477,11 +475,12 @@ _init()
            rw_init(sysent[AFS_SYSCALL].sy_lock, "afs_syscall",
 #ifdef AFS_SUN57_ENV
                    RW_DEFAULT, NULL);
-#else
+#else /* !AFS_SUN57_ENV */
                        RW_DEFAULT, DEFAULT_WT);
-#endif 
+#endif /* AFS_SUN57_ENV */
        }
     }
+#endif /* !AFS_SUN58_ENV */
 
     osi_Init();                                /* initialize global lock, etc */