]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-solaris11-update-20080317
authorMattias Pantzare <pantzer@ludd.ltu.se>
Mon, 17 Mar 2008 16:53:24 +0000 (16:53 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 17 Mar 2008 16:53:24 +0000 (16:53 +0000)
LICENSE IPL10

update solaris 11. probably we should do configure tests instead for
these things, since they're sort of "moving target"

(cherry picked from commit 680123d70c98d7d9e5884e3d43ed5298d6aad11d)

src/afs/SOLARIS/osi_file.c
src/afs/SOLARIS/osi_vfsops.c
src/afs/SOLARIS/osi_vnodeops.c
src/afs/afs_pioctl.c
src/rx/SOLARIS/rx_knet.c

index 3139e01ea2505284ad4d923dccd4812b27f6b965..ac92916cfa38ffec788ad35ae801009b3b0d9511 100644 (file)
@@ -86,7 +86,11 @@ VnodeToIno(vnode_t * vp)
     struct vattr vattr;
 
     vattr.va_mask = AT_FSID | AT_NODEID;       /* quick return using this mask. */
+#ifdef AFS_SUN511_ENV
+    code = VOP_GETATTR(vp, &vattr, 0, &afs_osi_cred, NULL);
+#else
     code = VOP_GETATTR(vp, &vattr, 0, &afs_osi_cred);
+#endif
     if (code) {
        osi_Panic("VnodeToIno");
     }
@@ -101,7 +105,11 @@ VnodeToDev(vnode_t * vp)
 
     vattr.va_mask = AT_FSID | AT_NODEID;       /* quick return using this mask. */
     AFS_GUNLOCK();
+#ifdef AFS_SUN511_ENV
+    code = VOP_GETATTR(vp, &vattr, 0, &afs_osi_cred, NULL);
+#else
     code = VOP_GETATTR(vp, &vattr, 0, &afs_osi_cred);
+#endif
     AFS_GLOCK();
     if (code) {
        osi_Panic("VnodeToDev");
@@ -122,7 +130,11 @@ VnodeToSize(vnode_t * vp)
     MObtainWriteLock(&afs_xosi, 578);
     vattr.va_mask = AT_SIZE;
     AFS_GUNLOCK();
+#ifdef AFS_SUN511_ENV
+    code = VOP_GETATTR(vp, &vattr, 0, &afs_osi_cred, NULL);
+#else
     code = VOP_GETATTR(vp, &vattr, 0, &afs_osi_cred);
+#endif
     AFS_GLOCK();
     if (code) {
        osi_Panic("VnodeToSize");
@@ -224,7 +236,11 @@ afs_osi_Stat(register struct osi_file *afile, register struct osi_stat *astat)
     /* Ufs doesn't seem to care about the flags so we pass 0 for now */
     tvattr.va_mask = AT_ALL;
     AFS_GUNLOCK();
+#ifdef AFS_SUN511_ENV 
+    code = VOP_GETATTR(afile->vnode, &tvattr, 0, &afs_osi_cred, NULL);
+#else
     code = VOP_GETATTR(afile->vnode, &tvattr, 0, &afs_osi_cred);
+#endif
     AFS_GLOCK();
     if (code == 0) {
        astat->size = tvattr.va_size;
index b44ecd349ac79b896a9889167f76a2dc5923e713..3f2f62915004cae8d4e1a76701fc468e3cf53811 100644 (file)
@@ -417,12 +417,22 @@ afsinit(struct vfssw *vfsswp, int fstype)
 }
 
 #ifdef AFS_SUN510_ENV
+#ifdef AFS_SUN511_ENV
+static struct vfsdef_v4 afs_vfsdef = {
+    VFSDEF_VERSION,
+    "afs",
+    afsinit,
+    0,
+    NULL
+};
+#else
 static struct vfsdef_v3 afs_vfsdef = {
     VFSDEF_VERSION,
     "afs",
     afsinit,
     0
 };
+#endif
 #else
 static struct vfssw afs_vfw = {
     "afs",
index 2c636c204aa425d208139ee1821b515936c73af1..c3e7007cba7485f0148029cb5aab3deb94a28cf6 100644 (file)
@@ -1404,6 +1404,25 @@ afs_dumpctl(vp, i
 }
 
 #ifdef AFS_SUN54_ENV
+#ifdef AFS_SUN511_ENV
+extern void
+afs_dispose(struct vnode *vp, struct page *p, int fl, int dn, struct cred *cr, struct caller_context_t *ct)
+{
+    fs_dispose(vp, p, fl, dn, cr,ct);
+}
+
+int
+afs_setsecattr(struct vnode *vp, vsecattr_t *vsecattr, int flag, struct cred *creds, struct caller_context_t *ct)
+{
+    return ENOSYS;
+}
+
+int
+afs_getsecattr(struct vnode *vp, vsecattr_t *vsecattr, int flag, struct cred *creds, struct caller_context_t *ct)
+{
+  return fs_fab_acl(vp, vsecattr, flag, creds,ct);
+}
+#else
 extern void
 afs_dispose(vp, p, fl, dn, cr)
      struct vnode *vp;
@@ -1434,6 +1453,7 @@ afs_getsecattr(vp, vsecattr, flag, creds)
     return fs_fab_acl(vp, vsecattr, flag, creds);
 }
 #endif
+#endif
 
 #ifdef AFS_GLOBAL_SUNLOCK
 extern int gafs_open(), gafs_close(), afs_ioctl(), gafs_access();
index 89ccfdf06d0ac934866314a2db7e716152dd3e41..444f4af1f9ced1d69808f02de43d10f813da006d 100644 (file)
@@ -884,8 +884,13 @@ afs_syscall_pioctl(path, com, cmarg, follow)
 #if defined(AFS_SUN510_ENV)
     if (vp && !IsAfsVnode(vp)) {
        struct vnode *realvp;
-       
-       if (VOP_REALVP(vp, &realvp) == 0) {
+       if
+#ifdef AFS_SUN511_ENV
+          (VOP_REALVP(vp, &realvp, NULL) == 0) 
+#else
+         (VOP_REALVP(vp, &realvp) == 0) 
+#endif
+{
            struct vnode *oldvp = vp;
            
            VN_HOLD(realvp);
index 6246fe199609218bffb281616949928b22a7aade..d30a0ffc02adf439b8df7fa466b1d2dbb471c813 100644 (file)
@@ -444,7 +444,11 @@ osi_FreeSocket(register osi_socket *asocket)
 
     /* Was sockfs_sounbind(so, 0); sockfs_sockfree(so); That's wrong */
     vp = SOTOV(so);
+ #ifdef AFS_SUN511_ENV
+    VOP_CLOSE(vp, FREAD|FWRITE, 1, (offset_t)0, CRED(), NULL);
+ #else
     VOP_CLOSE(vp, FREAD|FWRITE, 1, (offset_t)0, CRED());
+ #endif
     VN_RELE(vp);
 
     return 0;