From 680123d70c98d7d9e5884e3d43ed5298d6aad11d Mon Sep 17 00:00:00 2001 From: Mattias Pantzare Date: Mon, 17 Mar 2008 16:51:55 +0000 Subject: [PATCH] solaris11-update-20080317 LICENSE IPL10 update solaris 11. probably we should do configure tests instead for these things, since they're sort of "moving target" --- src/afs/SOLARIS/osi_file.c | 16 ++++++++++++++++ src/afs/SOLARIS/osi_vfsops.c | 10 ++++++++++ src/afs/SOLARIS/osi_vnodeops.c | 20 ++++++++++++++++++++ src/afs/afs_pioctl.c | 9 +++++++-- src/rx/SOLARIS/rx_knet.c | 4 ++++ 5 files changed, 57 insertions(+), 2 deletions(-) diff --git a/src/afs/SOLARIS/osi_file.c b/src/afs/SOLARIS/osi_file.c index 3139e01ea..ac92916cf 100644 --- a/src/afs/SOLARIS/osi_file.c +++ b/src/afs/SOLARIS/osi_file.c @@ -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; diff --git a/src/afs/SOLARIS/osi_vfsops.c b/src/afs/SOLARIS/osi_vfsops.c index b44ecd349..3f2f62915 100644 --- a/src/afs/SOLARIS/osi_vfsops.c +++ b/src/afs/SOLARIS/osi_vfsops.c @@ -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", diff --git a/src/afs/SOLARIS/osi_vnodeops.c b/src/afs/SOLARIS/osi_vnodeops.c index 2c636c204..c3e7007cb 100644 --- a/src/afs/SOLARIS/osi_vnodeops.c +++ b/src/afs/SOLARIS/osi_vnodeops.c @@ -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(); diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index 211059723..56304fcec 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -885,8 +885,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); diff --git a/src/rx/SOLARIS/rx_knet.c b/src/rx/SOLARIS/rx_knet.c index 6246fe199..d30a0ffc0 100644 --- a/src/rx/SOLARIS/rx_knet.c +++ b/src/rx/SOLARIS/rx_knet.c @@ -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; -- 2.39.5