afs: Avoid using logical OR when setting f_fsid
[openafs.git] / src / afs / HPUX / osi_vfsops.c
index 4a7b739..6383d53 100644 (file)
@@ -13,8 +13,6 @@
 #include <afsconfig.h>
 #include "afs/param.h"
 
-RCSID
-    ("$Header$");
 
 #include "afs/sysincludes.h"   /* Standard vendor system headers */
 #include "afsincludes.h"       /* Afs-based standard headers */
@@ -116,11 +114,11 @@ afs_root(struct vfs *afsp, struct vnode **avpp, char *unused1)
 {
     int code = 0;
     struct vrequest treq;
-    register struct vcache *tvp = 0;
+    struct vcache *tvp = 0;
     AFS_GLOCK();
     AFS_STATCNT(afs_root);
 
-    if (afs_globalVp && (afs_globalVp->states & CStatd)) {
+    if (afs_globalVp && (afs_globalVp->f.states & CStatd)) {
        tvp = afs_globalVp;
     } else {
        if (afs_globalVp) {
@@ -130,12 +128,12 @@ afs_root(struct vfs *afsp, struct vnode **avpp, char *unused1)
 
        if (!(code = afs_InitReq(&treq, p_cred(u.u_procp)))
            && !(code = afs_CheckInit())) {
-           tvp = afs_GetVCache(&afs_rootFid, &treq, NULL, NULL);
+           tvp = afs_GetVCache(&afs_rootFid, &treq);
            /* we really want this to stay around */
            if (tvp) {
                afs_globalVp = tvp;
            } else
-               code = ENOENT;
+               code = EIO;
        }
     }
     if (tvp) {
@@ -154,7 +152,7 @@ afs_root(struct vfs *afsp, struct vnode **avpp, char *unused1)
 }
 
 int
-afs_statfs(register struct vfs *afsp, struct k_statvfs *abp)
+afs_statfs(struct vfs *afsp, struct k_statvfs *abp)
 {
     AFS_GLOCK();
     AFS_STATCNT(afs_statfs);
@@ -167,8 +165,8 @@ afs_statfs(register struct vfs *afsp, struct k_statvfs *abp)
      * before storing something there.
      */
     abp->f_blocks = abp->f_bfree = abp->f_bavail = abp->f_files =
-       abp->f_ffree = abp->f_favail = 9000000;
-    abp->f_fsid = (AFS_VFSMAGIC << 16) || AFS_VFSFSID;
+       abp->f_ffree = abp->f_favail = AFS_VFS_FAKEFREE;
+    abp->f_fsid = (AFS_VFSMAGIC << 16) | AFS_VFSFSID;
 
     AFS_GUNLOCK();
     return 0;
@@ -253,7 +251,7 @@ b_sema_t afs_global_sema = { 0 };
 void
 osi_InitGlock()
 {
-    register ulong_t context;
+    ulong_t context;
 
     SPINLOCK_USAV(sched_lock, context);
     if (!afs_Starting) {