Remove support for Solaris pre-8
[openafs.git] / src / afs / SOLARIS / osi_inode.c
index 0353d18..42c3541 100644 (file)
@@ -43,7 +43,7 @@ getinode(vfsp, dev, inode, ipp, credp, perror)
      int *perror;
 {
     struct inode *ip;
-    register afs_int32 code;
+    afs_int32 code;
     struct vnode *vp;
     struct fs *fs;
     struct inode *pip;
@@ -53,13 +53,7 @@ getinode(vfsp, dev, inode, ipp, credp, perror)
 
     *perror = 0;
 
-    if (!vfsp
-#if !defined(AFS_SUN58_ENV)
-       && !(vfsp = vfs_devsearch(dev))
-#else
-       && !(vfsp = vfs_dev2vfsp(dev))
-#endif
-       ) {
+    if (!vfsp && !(vfsp = vfs_dev2vfsp(dev))) {
        return (ENODEV);
     }
     ufsvfsp = (struct ufsvfs *)vfsp->vfs_data;
@@ -91,7 +85,7 @@ igetinode(vfsp, dev, inode, ipp, credp, perror)
 {
     struct inode *pip, *ip;
     extern struct osi_dev cacheDev;
-    register int code = 0;
+    int code = 0;
 
     *perror = 0;
 
@@ -150,7 +144,7 @@ afs_syscall_icreate(dev, near_inode, param1, param2, param3, param4, rvp,
 {
     int dummy, err = 0;
     struct inode *ip, *newip;
-    register int code;
+    int code;
     dev_t newdev;
     struct ufsvfs *ufsvfsp;
 
@@ -163,7 +157,7 @@ afs_syscall_icreate(dev, near_inode, param1, param2, param3, param4, rvp,
       * This conversion is needed only for the 64 bit OS.
       */
 
-#ifdef AFS_SUN57_64BIT_ENV
+#ifdef AFS_SUN5_64BIT_ENV
     newdev = expldev((dev32_t) dev);
 #else
     newdev = dev;
@@ -195,12 +189,7 @@ afs_syscall_icreate(dev, near_inode, param1, param2, param3, param4, rvp,
     rw_enter(&newip->i_contents, RW_WRITER);
     newip->i_flag |= IACC | IUPD | ICHG;
 
-#if    defined(AFS_SUN56_ENV)
     newip->i_vicemagic = VICEMAGIC;
-#else
-    newip->i_uid = 0;
-    newip->i_gid = -2;
-#endif
     newip->i_nlink = 1;
     newip->i_mode = IFREG;
 #ifdef AFS_SUN510_ENV
@@ -219,7 +208,7 @@ afs_syscall_icreate(dev, near_inode, param1, param2, param3, param4, rvp,
            (((param4 >> 16) & 0x1f) << 22) + (param3 & 0x3fffff);
        newip->i_vicep3 = ((param4 << 16) + (param2 & 0xffff));
     }
-#ifdef AFS_SUN57_64BIT_ENV
+#ifdef AFS_SUN5_64BIT_ENV
     rvp->r_vals = newip->i_number;
 #else
     rvp->r_val1 = newip->i_number;
@@ -247,7 +236,7 @@ afs_syscall_iopen(dev, inode, usrmod, rvp, credp)
     struct vnode *vp = NULL;
     int dummy;
     int fd;
-    register int code;
+    int code;
     dev_t newdev;
 
     AFS_STATCNT(afs_syscall_iopen);
@@ -259,7 +248,7 @@ afs_syscall_iopen(dev, inode, usrmod, rvp, credp)
       * This conversion is needed only for the 64 bit OS.
       */
 
-#ifdef AFS_SUN57_64BIT_ENV
+#ifdef AFS_SUN5_64BIT_ENV
     newdev = expldev((dev32_t) dev);
 #else
     newdev = dev;
@@ -295,7 +284,13 @@ afs_syscall_iopen(dev, inode, usrmod, rvp, credp)
      * XXX We should set the fp to null since we don't need it in the icalls
      */
     setf(fd, fp);
-#ifdef AFS_SUN57_64BIT_ENV
+
+    /* rvp->r_val{1,2} are really members into a union and are re-extracted
+     * later by solaris. If we're not 64-bit, they appear to just be the same
+     * thing, but on 64-bit they point to two different 32-bit locations that
+     * make up one 64-bit int; so on 64-bit big-endian we need to set the
+     * second one. */
+#if defined(AFS_SUN5_64BIT_ENV) && !defined(AFSLITTLE_ENDIAN)
     rvp->r_val2 = fd;
 #else
     rvp->r_val1 = fd;
@@ -314,7 +309,7 @@ afs_syscall_iincdec(dev, inode, inode_p1, amount, rvp, credp)
 {
     int dummy;
     struct inode *ip;
-    register afs_int32 code;
+    afs_int32 code;
     dev_t newdev;
 
     if (!afs_osi_suser(credp))
@@ -324,7 +319,7 @@ afs_syscall_iincdec(dev, inode, inode_p1, amount, rvp, credp)
       * This conversion is needed only for the 64 bit OS.
       */
 
-#ifdef AFS_SUN57_64BIT_ENV
+#ifdef AFS_SUN5_64BIT_ENV
     newdev = expldev((dev32_t) dev);
 #else
     newdev = dev;