#endif
#ifdef AFS_GLOBAL_SUNLOCK
-extern int gafs_open(struct vcache **avcp, afs_int32 aflags,
- afs_ucred_t *acred);
-extern int gafs_close(struct vcache *avc, afs_int32 aflags,
- int count, offset_t offset, afs_ucred_t *acred);
-extern int afs_ioctl(struct vnode *vnp, int com, int arg, int flag,
- cred_t *credp, int *rvalp);
-extern int gafs_access(struct vcache *avc, afs_int32 amode,
- int flags, afs_ucred_t *acred);
-extern int gafs_getattr(struct vcache *avc,
- struct vattr *attrs, int flags,
- afs_ucred_t *acred);
-extern int gafs_setattr(struct vcache *avc,
- struct vattr *attrs, int flags,
- afs_ucred_t *acred);
-extern int gafs_lookup(struct vcache *adp, char *aname,
- struct vcache **avcp, struct pathname *pnp,
- int flags, struct vnode *rdir, afs_ucred_t *acred);
-extern int gafs_remove(struct vcache *adp, char *aname,
- afs_ucred_t *acred);
-extern int gafs_link(struct vcache *adp, struct vcache *avc,
- char *aname, afs_ucred_t *acred);
-extern int gafs_rename(struct vcache *aodp, char *aname1,
- struct vcache *andp, char *aname2,
- afs_ucred_t *acred);
-extern int gafs_symlink(struct vcache *adp, char *aname,
- struct vattr *attrs, char *atargetName,
- afs_ucred_t *acred);
-extern int gafs_rmdir(struct vcache *adp, char *aname,
- struct vnode *cdirp, afs_ucred_t *acred);
-extern int gafs_mkdir(struct vcache *adp, char *aname,
- struct vattr *attrs, struct vcache **avcp,
- afs_ucred_t *acred);
-extern int gafs_fsync(struct vcache *avc, int flag, afs_ucred_t *acred);
-extern int gafs_readlink(struct vcache *avc, struct uio *auio,
- afs_ucred_t *acred);
-extern int gafs_readdir(struct vcache *avc, struct uio *auio,
- afs_ucred_t *acred, int *eofp);
-extern void gafs_inactive(struct vcache *avc,
- afs_ucred_t *acred);
-extern int gafs_fid(struct vcache *avc, struct fid **fidpp);
-extern int gafs_create(struct vcache *adp, char *aname,
- struct vattr *attrs, enum vcexcl aexcl, int amode,
- struct vcache **avcp, afs_ucred_t *acred);
-#ifdef AFS_SUN511_ENV
-extern int afs_pathconf(struct vnode *vp, int cmd, u_long *outdatap,
- afs_ucred_t *credp, caller_context_t *ct);
-#else
-extern int afs_pathconf(struct vnode *vp, int cmd, u_long *outdatap,
- afs_ucred_t *credp);
-#endif /* AFS_SUN511_ENV */
-#if defined(AFS_SUN511_ENV)
-/* The following list must always be NULL-terminated */
-const fs_operation_def_t afs_vnodeops_template[] = {
- VOPNAME_OPEN, { .vop_open = gafs_open },
- VOPNAME_CLOSE, { .vop_close = gafs_close },
- VOPNAME_READ, { .vop_read = afs_vmread },
- VOPNAME_WRITE, { .vop_write = afs_vmwrite },
- VOPNAME_IOCTL, { .vop_ioctl = afs_ioctl },
- VOPNAME_SETFL, { .vop_setfl = fs_setfl },
- VOPNAME_GETATTR, { .vop_getattr = gafs_getattr },
- VOPNAME_SETATTR, { .vop_setattr = gafs_setattr },
- VOPNAME_ACCESS, { .vop_access = gafs_access },
- VOPNAME_LOOKUP, { .vop_lookup = gafs_lookup },
- VOPNAME_CREATE, { .vop_create = gafs_create },
- VOPNAME_REMOVE, { .vop_remove = gafs_remove },
- VOPNAME_LINK, { .vop_link = gafs_link },
- VOPNAME_RENAME, { .vop_rename = gafs_rename },
- VOPNAME_MKDIR, { .vop_mkdir = gafs_mkdir },
- VOPNAME_RMDIR, { .vop_rmdir = gafs_rmdir },
- VOPNAME_READDIR, { .vop_readdir = gafs_readdir },
- VOPNAME_SYMLINK, { .vop_symlink = gafs_symlink },
- VOPNAME_READLINK, { .vop_readlink = gafs_readlink },
- VOPNAME_FSYNC, { .vop_fsync = gafs_fsync },
- VOPNAME_INACTIVE, { .vop_inactive = gafs_inactive },
- VOPNAME_FID, { .vop_fid = gafs_fid },
- VOPNAME_RWLOCK, { .vop_rwlock = afs_rwlock },
- VOPNAME_RWUNLOCK, { .vop_rwunlock = afs_rwunlock },
- VOPNAME_SEEK, { .vop_seek = afs_seek },
- VOPNAME_CMP, { .vop_cmp = afs_cmp },
- VOPNAME_FRLOCK, { .vop_frlock = afs_frlock },
- VOPNAME_SPACE, { .vop_space = afs_space },
- VOPNAME_REALVP, { .vop_realvp = afs_realvp },
- VOPNAME_GETPAGE, { .vop_getpage = afs_getpage },
- VOPNAME_PUTPAGE, { .vop_putpage = afs_putpage },
- VOPNAME_MAP, { .vop_map = afs_map },
- VOPNAME_ADDMAP, { .vop_addmap = afs_addmap },
- VOPNAME_DELMAP, { .vop_delmap = afs_delmap },
- VOPNAME_POLL, { .vop_poll = fs_poll },
- VOPNAME_PATHCONF, { .vop_pathconf = afs_pathconf },
- VOPNAME_PAGEIO, { .vop_pageio = afs_pageio },
- VOPNAME_DUMP, { .vop_dump = afs_dump },
- VOPNAME_DUMPCTL, { .vop_dumpctl = afs_dumpctl },
- VOPNAME_DISPOSE, { .vop_dispose = afs_dispose },
- VOPNAME_GETSECATTR, { .vop_getsecattr = afs_getsecattr },
- VOPNAME_SETSECATTR, { .vop_setsecattr = afs_setsecattr },
- VOPNAME_SHRLOCK, { .vop_shrlock = fs_shrlock },
- NULL, NULL
-};
-vnodeops_t *afs_ops;
-#elif defined(AFS_SUN510_ENV)
-/* The following list must always be NULL-terminated */
-const fs_operation_def_t afs_vnodeops_template[] = {
- VOPNAME_OPEN, gafs_open,
- VOPNAME_CLOSE, gafs_close,
- VOPNAME_READ, afs_vmread,
- VOPNAME_WRITE, afs_vmwrite,
- VOPNAME_IOCTL, afs_ioctl,
- VOPNAME_SETFL, fs_setfl,
- VOPNAME_GETATTR, gafs_getattr,
- VOPNAME_SETATTR, gafs_setattr,
- VOPNAME_ACCESS, gafs_access,
- VOPNAME_LOOKUP, gafs_lookup,
- VOPNAME_CREATE, gafs_create,
- VOPNAME_REMOVE, gafs_remove,
- VOPNAME_LINK, gafs_link,
- VOPNAME_RENAME, gafs_rename,
- VOPNAME_MKDIR, gafs_mkdir,
- VOPNAME_RMDIR, gafs_rmdir,
- VOPNAME_READDIR, gafs_readdir,
- VOPNAME_SYMLINK, gafs_symlink,
- VOPNAME_READLINK, gafs_readlink,
- VOPNAME_FSYNC, gafs_fsync,
- VOPNAME_INACTIVE, gafs_inactive,
- VOPNAME_FID, gafs_fid,
- VOPNAME_RWLOCK, afs_rwlock,
- VOPNAME_RWUNLOCK, afs_rwunlock,
- VOPNAME_SEEK, afs_seek,
- VOPNAME_CMP, afs_cmp,
- VOPNAME_FRLOCK, afs_frlock,
- VOPNAME_SPACE, afs_space,
- VOPNAME_REALVP, afs_realvp,
- VOPNAME_GETPAGE, afs_getpage,
- VOPNAME_PUTPAGE, afs_putpage,
- VOPNAME_MAP, afs_map,
- VOPNAME_ADDMAP, afs_addmap,
- VOPNAME_DELMAP, afs_delmap,
- VOPNAME_POLL, fs_poll,
- VOPNAME_DUMP, afs_dump,
- VOPNAME_PATHCONF, afs_pathconf,
- VOPNAME_PAGEIO, afs_pageio,
- VOPNAME_DUMPCTL, afs_dumpctl,
- VOPNAME_DISPOSE, afs_dispose,
- VOPNAME_GETSECATTR, afs_getsecattr,
- VOPNAME_SETSECATTR, afs_setsecattr,
- VOPNAME_SHRLOCK, fs_shrlock,
- NULL, NULL
-};
-struct vnodeops *afs_ops;
-#else
-struct vnodeops Afs_vnodeops = {
- gafs_open,
- gafs_close,
- afs_vmread,
- afs_vmwrite,
- afs_ioctl,
- fs_setfl,
- gafs_getattr,
- gafs_setattr,
- gafs_access,
- gafs_lookup,
- gafs_create,
- gafs_remove,
- gafs_link,
- gafs_rename,
- gafs_mkdir,
- gafs_rmdir,
- gafs_readdir,
- gafs_symlink,
- gafs_readlink,
- gafs_fsync,
- gafs_inactive,
- gafs_fid,
- afs_rwlock,
- afs_rwunlock,
- afs_seek,
- afs_cmp,
- afs_frlock,
- afs_space,
- afs_realvp,
- afs_getpage,
- afs_putpage,
- afs_map,
- afs_addmap,
- afs_delmap,
- fs_poll,
- afs_dump,
- afs_pathconf,
- afs_pageio,
- afs_dumpctl,
- afs_dispose,
- afs_setsecattr,
- afs_getsecattr,
- fs_shrlock,
-};
-struct vnodeops *afs_ops = &Afs_vnodeops;
-#endif
-
-int
+static int
gafs_open(struct vcache **avcp, afs_int32 aflags,
afs_ucred_t *acred)
{
return (code);
}
-int
+static int
gafs_close(struct vcache *avc, afs_int32 aflags, int count,
offset_t offset, afs_ucred_t *acred)
{
return (code);
}
-int
+static int
gafs_getattr(struct vcache *avc, struct vattr *attrs,
int flags, afs_ucred_t *acred)
{
}
-int
+static int
gafs_setattr(struct vcache *avc, struct vattr *attrs,
int flags, afs_ucred_t *acred)
{
}
-int
+static int
gafs_access(struct vcache *avc, afs_int32 amode, int flags,
afs_ucred_t *acred)
{
}
-int
+static int
gafs_lookup(struct vcache *adp, char *aname,
struct vcache **avcp, struct pathname *pnp, int flags,
struct vnode *rdir, afs_ucred_t *acred)
}
-int
+static int
gafs_create(struct vcache *adp, char *aname, struct vattr *attrs,
enum vcexcl aexcl, int amode, struct vcache **avcp,
afs_ucred_t *acred)
return (code);
}
-int
+static int
gafs_remove(struct vcache *adp, char *aname, afs_ucred_t *acred)
{
int code;
return (code);
}
-int
+static int
gafs_link(struct vcache *adp, struct vcache *avc,
char *aname, afs_ucred_t *acred)
{
return (code);
}
-int
+static int
gafs_rename(struct vcache *aodp, char *aname1,
struct vcache *andp, char *aname2,
afs_ucred_t *acred)
return (code);
}
-int
+static int
gafs_mkdir(struct vcache *adp, char *aname, struct vattr *attrs,
struct vcache **avcp, afs_ucred_t *acred)
{
return (code);
}
-int
+static int
gafs_rmdir(struct vcache *adp, char *aname, struct vnode *cdirp,
afs_ucred_t *acred)
{
}
-int
+static int
gafs_readdir(struct vcache *avc, struct uio *auio,
afs_ucred_t *acred, int *eofp)
{
return (code);
}
-int
+static int
gafs_symlink(struct vcache *adp, char *aname, struct vattr *attrs,
char *atargetName, afs_ucred_t *acred)
{
}
-int
+static int
gafs_readlink(struct vcache *avc, struct uio *auio, afs_ucred_t *acred)
{
int code;
return (code);
}
-int
+static int
gafs_fsync(struct vcache *avc, int flag, afs_ucred_t *acred)
{
int code;
return (code);
}
-int
+static int
afs_inactive(struct vcache *avc, afs_ucred_t *acred)
{
struct vnode *vp = AFSTOV(avc);
return 0;
}
-void
+static void
gafs_inactive(struct vcache *avc, afs_ucred_t *acred)
{
AFS_GLOCK();
}
-int
+static int
gafs_fid(struct vcache *avc, struct fid **fidpp)
{
int code;
return (code);
}
+#if defined(AFS_SUN511_ENV)
+/* The following list must always be NULL-terminated */
+const fs_operation_def_t afs_vnodeops_template[] = {
+ VOPNAME_OPEN, { .vop_open = gafs_open },
+ VOPNAME_CLOSE, { .vop_close = gafs_close },
+ VOPNAME_READ, { .vop_read = afs_vmread },
+ VOPNAME_WRITE, { .vop_write = afs_vmwrite },
+ VOPNAME_IOCTL, { .vop_ioctl = afs_ioctl },
+ VOPNAME_SETFL, { .vop_setfl = fs_setfl },
+ VOPNAME_GETATTR, { .vop_getattr = gafs_getattr },
+ VOPNAME_SETATTR, { .vop_setattr = gafs_setattr },
+ VOPNAME_ACCESS, { .vop_access = gafs_access },
+ VOPNAME_LOOKUP, { .vop_lookup = gafs_lookup },
+ VOPNAME_CREATE, { .vop_create = gafs_create },
+ VOPNAME_REMOVE, { .vop_remove = gafs_remove },
+ VOPNAME_LINK, { .vop_link = gafs_link },
+ VOPNAME_RENAME, { .vop_rename = gafs_rename },
+ VOPNAME_MKDIR, { .vop_mkdir = gafs_mkdir },
+ VOPNAME_RMDIR, { .vop_rmdir = gafs_rmdir },
+ VOPNAME_READDIR, { .vop_readdir = gafs_readdir },
+ VOPNAME_SYMLINK, { .vop_symlink = gafs_symlink },
+ VOPNAME_READLINK, { .vop_readlink = gafs_readlink },
+ VOPNAME_FSYNC, { .vop_fsync = gafs_fsync },
+ VOPNAME_INACTIVE, { .vop_inactive = gafs_inactive },
+ VOPNAME_FID, { .vop_fid = gafs_fid },
+ VOPNAME_RWLOCK, { .vop_rwlock = afs_rwlock },
+ VOPNAME_RWUNLOCK, { .vop_rwunlock = afs_rwunlock },
+ VOPNAME_SEEK, { .vop_seek = afs_seek },
+ VOPNAME_CMP, { .vop_cmp = afs_cmp },
+ VOPNAME_FRLOCK, { .vop_frlock = afs_frlock },
+ VOPNAME_SPACE, { .vop_space = afs_space },
+ VOPNAME_REALVP, { .vop_realvp = afs_realvp },
+ VOPNAME_GETPAGE, { .vop_getpage = afs_getpage },
+ VOPNAME_PUTPAGE, { .vop_putpage = afs_putpage },
+ VOPNAME_MAP, { .vop_map = afs_map },
+ VOPNAME_ADDMAP, { .vop_addmap = afs_addmap },
+ VOPNAME_DELMAP, { .vop_delmap = afs_delmap },
+ VOPNAME_POLL, { .vop_poll = fs_poll },
+ VOPNAME_PATHCONF, { .vop_pathconf = afs_pathconf },
+ VOPNAME_PAGEIO, { .vop_pageio = afs_pageio },
+ VOPNAME_DUMP, { .vop_dump = afs_dump },
+ VOPNAME_DUMPCTL, { .vop_dumpctl = afs_dumpctl },
+ VOPNAME_DISPOSE, { .vop_dispose = afs_dispose },
+ VOPNAME_GETSECATTR, { .vop_getsecattr = afs_getsecattr },
+ VOPNAME_SETSECATTR, { .vop_setsecattr = afs_setsecattr },
+ VOPNAME_SHRLOCK, { .vop_shrlock = fs_shrlock },
+ NULL, NULL
+};
+vnodeops_t *afs_ops;
+#elif defined(AFS_SUN510_ENV)
+/* The following list must always be NULL-terminated */
+const fs_operation_def_t afs_vnodeops_template[] = {
+ VOPNAME_OPEN, gafs_open,
+ VOPNAME_CLOSE, gafs_close,
+ VOPNAME_READ, afs_vmread,
+ VOPNAME_WRITE, afs_vmwrite,
+ VOPNAME_IOCTL, afs_ioctl,
+ VOPNAME_SETFL, fs_setfl,
+ VOPNAME_GETATTR, gafs_getattr,
+ VOPNAME_SETATTR, gafs_setattr,
+ VOPNAME_ACCESS, gafs_access,
+ VOPNAME_LOOKUP, gafs_lookup,
+ VOPNAME_CREATE, gafs_create,
+ VOPNAME_REMOVE, gafs_remove,
+ VOPNAME_LINK, gafs_link,
+ VOPNAME_RENAME, gafs_rename,
+ VOPNAME_MKDIR, gafs_mkdir,
+ VOPNAME_RMDIR, gafs_rmdir,
+ VOPNAME_READDIR, gafs_readdir,
+ VOPNAME_SYMLINK, gafs_symlink,
+ VOPNAME_READLINK, gafs_readlink,
+ VOPNAME_FSYNC, gafs_fsync,
+ VOPNAME_INACTIVE, gafs_inactive,
+ VOPNAME_FID, gafs_fid,
+ VOPNAME_RWLOCK, afs_rwlock,
+ VOPNAME_RWUNLOCK, afs_rwunlock,
+ VOPNAME_SEEK, afs_seek,
+ VOPNAME_CMP, afs_cmp,
+ VOPNAME_FRLOCK, afs_frlock,
+ VOPNAME_SPACE, afs_space,
+ VOPNAME_REALVP, afs_realvp,
+ VOPNAME_GETPAGE, afs_getpage,
+ VOPNAME_PUTPAGE, afs_putpage,
+ VOPNAME_MAP, afs_map,
+ VOPNAME_ADDMAP, afs_addmap,
+ VOPNAME_DELMAP, afs_delmap,
+ VOPNAME_POLL, fs_poll,
+ VOPNAME_DUMP, afs_dump,
+ VOPNAME_PATHCONF, afs_pathconf,
+ VOPNAME_PAGEIO, afs_pageio,
+ VOPNAME_DUMPCTL, afs_dumpctl,
+ VOPNAME_DISPOSE, afs_dispose,
+ VOPNAME_GETSECATTR, afs_getsecattr,
+ VOPNAME_SETSECATTR, afs_setsecattr,
+ VOPNAME_SHRLOCK, fs_shrlock,
+ NULL, NULL
+};
+struct vnodeops *afs_ops;
+#else
+struct vnodeops Afs_vnodeops = {
+ gafs_open,
+ gafs_close,
+ afs_vmread,
+ afs_vmwrite,
+ afs_ioctl,
+ fs_setfl,
+ gafs_getattr,
+ gafs_setattr,
+ gafs_access,
+ gafs_lookup,
+ gafs_create,
+ gafs_remove,
+ gafs_link,
+ gafs_rename,
+ gafs_mkdir,
+ gafs_rmdir,
+ gafs_readdir,
+ gafs_symlink,
+ gafs_readlink,
+ gafs_fsync,
+ gafs_inactive,
+ gafs_fid,
+ afs_rwlock,
+ afs_rwunlock,
+ afs_seek,
+ afs_cmp,
+ afs_frlock,
+ afs_space,
+ afs_realvp,
+ afs_getpage,
+ afs_putpage,
+ afs_map,
+ afs_addmap,
+ afs_delmap,
+ fs_poll,
+ afs_dump,
+ afs_pathconf,
+ afs_pageio,
+ afs_dumpctl,
+ afs_dispose,
+ afs_setsecattr,
+ afs_getsecattr,
+ fs_shrlock,
+};
+struct vnodeops *afs_ops = &Afs_vnodeops;
+#endif
+
#endif /* AFS_GLOBAL_SUNLOCK */