}
#endif
-afs_syscall_icreate(dev, near_inode, param1, param2, param3, param4, retval)
- long *retval;
- long dev, near_inode, param1, param2, param3, param4;
+int
+afs_syscall_icreate(long dev, long near_inode, long param1, long param2,
+ long param3, long param4, long *retval)
{
return EOPNOTSUPP;
}
-afs_syscall_iopen(dev, inode, usrmod, retval)
- long *retval;
- int dev, inode, usrmod;
+int
+afs_syscall_iopen(int dev, int inode, int usrmod, long *retval)
{
return EOPNOTSUPP;
}
-afs_syscall_iincdec(dev, inode, inode_p1, amount)
- int dev, inode, inode_p1, amount;
+int
+afs_syscall_iincdec(int dev, int inode, int inode_p1, int amount)
{
return EOPNOTSUPP;
}
struct vcache *avc = VTOAFS(vp);
AFS_GLOCK();
if (vop_cred)
- code = afs_close(avc, ap->a_fflag, vop_cred, vop_proc);
+ code = afs_close(avc, ap->a_fflag, vop_cred);
else
- code = afs_close(avc, ap->a_fflag, &afs_osi_cred, vop_proc);
+ code = afs_close(avc, ap->a_fflag, &afs_osi_cred);
osi_FlushPages(avc, vop_cred); /* hold bozon lock, but not basic vnode lock */
/* This is legit; it just forces the fstrace event to happen */
code = afs_CheckCode(code, NULL, 60);
if (((ap->a_command >> 8) & 0xff) == 'V') {
/* This is a VICEIOCTL call */
AFS_GLOCK();
- error = HandleIoctl(tvc, (struct file *)0 /*Not used */ ,
- ap->a_command, ap->a_data);
+ error = HandleIoctl(tvc, ap->a_command, ap->a_data);
AFS_GUNLOCK();
return (error);
} else {
* 1 - success
*/
static int
-linux_alloc_init()
+linux_alloc_init(void)
{
/* initiate our pool of osi_linux_mem structs */
al_mem_pool =
/* get_hash_stats() : get hash table statistics */
static void
-get_hash_stats()
+get_hash_stats(void)
{
int i;
#include "afs/afs_stats.h" /* statistics stuff */
int
-afs_syscall_icreate(void)
+afs_syscall_icreate(long a, long b, long c, long d, long e, long f)
{
return 0;
}
int
-afs_syscall_iopen(void)
+afs_syscall_iopen(int a, int b, int c)
{
return 0;
}
int
-afs_syscall_iincdec(void)
+afs_syscall_iincdec(int a, int v, int c, int d)
{
return 0;
}
};
#endif
-extern long afs_xsetgroups();
+extern long afs_xsetgroups(int gidsetsize, gid_t * grouplist);
asmlinkage long (*sys_setgroupsp) (int gidsetsize, gid_t * grouplist);
#ifdef AFS_LINUX24_ENV
-extern int afs_xsetgroups32();
+extern int afs_xsetgroups32(int gidsetsize, gid_t * grouplist);
asmlinkage int (*sys_setgroups32p) (int gidsetsize,
__kernel_gid32_t * grouplist);
#endif
static int
afs_linux_readdir(struct file *fp, void *dirbuf, filldir_t filldir)
{
- extern struct DirEntry *afs_dir_GetBlob();
struct vcache *avc = VTOAFS(FILE_INODE(fp));
struct vrequest treq;
register struct dcache *tdc;
&& !(tvc->states & CUnlinked)) {
struct dentry *__dp;
char *__name;
- extern char *afs_newname();
__dp = NULL;
__name = NULL;
* We do not support the inode related system calls
*/
int
-afs_syscall_icreate(void)
+afs_syscall_icreate(long a, long b, long c, long d, long e, long f)
{
usr_assert(0);
return 0;
}
int
-afs_syscall_iincdec(void)
+afs_syscall_iincdec(int dev, int inode, int inode_p1, int amount)
{
usr_assert(0);
return 0;
}
int
-afs_syscall_iopen(void)
+afs_syscall_iopen(int dev, int inode, int usrmod)
{
usr_assert(0);
return 0;
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
#include "afs/afs_stats.h" /* statistics */
-
-extern int afs_noop();
-extern int afs_badop();
-
-extern int afs_open();
-extern int afs_close();
-extern int afs_getattr();
-extern int afs_setattr();
-extern int afs_access();
-extern int afs_lookup();
-extern int afs_create();
-extern int afs_remove();
-extern int afs_link();
-extern int afs_rename();
-extern int afs_mkdir();
-extern int afs_rmdir();
-extern int afs_readdir();
-extern int afs_symlink();
-extern int afs_readlink();
-extern int afs_fsync();
-extern int afs_lockctl();
-extern int afs_fid();
-
+
int
afs_vrdwr(struct usr_vnode *avc, struct usr_uio *uio, int rw, int io,
struct usr_ucred *cred)
unsigned long ic_spare[4];
} i_ic;
};
-extern struct usr_inode *iget();
struct usr_fileops {
int (*vno_rw) (void);
char *f_data;
long f_type;
};
-extern struct usr_file *falloc();
+
extern struct usr_file *getf(int);
#ifdef fid_len
#define NDIRSIZ_LEN(len) \
((sizeof (struct usr_dirent)+4 - (MAXNAMLEN+1)) + (((len)+1 + 3) &~ 3))
+struct vcache;
+#define AFS_UCRED usr_ucred
+#define AFS_FLOCK flock
+
+
struct usr_vnodeops {
int (*vn_open) (char *path, int flags, int mode);
int (*vn_close) (int fd);
- int (*vn_rdwr) ();
+ int (*vn_rdwr) (struct usr_vnode *avc, struct usr_uio *uio,
+ int rw, int io, struct usr_ucred *cred);
int (*vn_ioctl) (void);
int (*vn_select) (void);
- int (*vn_getattr) ();
- int (*vn_setattr) ();
- int (*vn_access) ();
- int (*vn_lookup) ();
- int (*vn_create) ();
- int (*vn_remove) ();
- int (*vn_link) ();
- int (*vn_rename) ();
- int (*vn_mkdir) ();
- int (*vn_rmdir) ();
- int (*vn_readdir) ();
- int (*vn_symlink) ();
- int (*vn_readlink) ();
- int (*vn_fsync) ();
- int (*vn_inactive) ();
- int (*vn_bmap) ();
- int (*vn_strategy) ();
- int (*vn_bread) ();
- int (*vn_brelse) ();
- int (*vn_lockctl) ();
- int (*vn_fid) ();
+ int (*vn_getattr) (struct vcache *avc, struct vattr *, struct AFS_UCRED *);
+ int (*vn_setattr) (struct vcache *avc, struct vattr *, struct AFS_UCRED *);
+ int (*vn_access) (struct vcache *avc, afs_int32, struct AFS_UCRED *);
+ int (*vn_lookup) (struct vcache *adp, char *, struct vcache **,
+ struct AFS_UCRED *, int);
+ int (*vn_create) (struct vcache *adp, char *, struct vattr *,
+ enum vcexcl, int, struct vcache **, struct AFS_UCRED *);
+ int (*vn_remove) (struct vcache *adp, char *, struct AFS_UCRED *);
+ int (*vn_link) (struct vcache *avc, struct vcache *adp, char *,
+ struct AFS_UCRED *);
+ int (*vn_rename) (struct vcache *aodp, char *, struct vcache *, char *,
+ struct AFS_UCRED *);
+ int (*vn_mkdir) (struct vcache *adp, char *, struct vattr *,
+ struct vcache **, struct AFS_UCRED *);
+ int (*vn_rmdir) (struct vcache *adp, char *, struct AFS_UCRED *);
+ int (*vn_readdir) (struct vcache *avc, struct uio *, struct AFS_UCRED *);
+ int (*vn_symlink) (struct vcache *adp, char *, struct vattr *, char *,
+ struct AFS_UCRED *);
+ int (*vn_readlink) (struct vcache *avc, struct uio *, struct AFS_UCRED *);
+ int (*vn_fsync) (struct vcache *avc, struct AFS_UCRED *);
+ int (*vn_inactive) (struct vcache *avc, struct AFS_UCRED *acred);
+ int (*vn_bmap) (void);
+ int (*vn_strategy) (void);
+ int (*vn_bread) (void);
+ int (*vn_brelse) (void);
+ int (*vn_lockctl) (struct vcache *, struct AFS_FLOCK *, int,
+ struct AFS_UCRED *);
+ int (*vn_fid) (struct vcache *avc, struct fid **);
};
struct usr_fs {
typedef long usr_whymountroot_t;
struct usr_vfsops {
- int (*vfs_mount) ();
- int (*vfs_unmount) ();
- int (*vfs_root) ();
- int (*vfs_statfs) ();
- int (*vfs_mountroot) ();
- int (*vfs_swapvp) ();
+ int (*vfs_mount) (struct vfs *, char *, caddr_t);
+ int (*vfs_unmount) (struct vfs *);
+ int (*vfs_root) (struct vfs *, struct vnode **);
+ int (*vfs_statfs) (struct vfs *, struct statfs *);
+ int (*vfs_mountroot) (struct vfs *);
+ int (*vfs_swapvp) (void);
};
struct usr_vfs {
struct usr_sysent {
char sy_narg;
- int (*sy_call) ();
+ int (*sy_call) (void);
};
extern struct usr_sysent usr_sysent[];
* _is_ cached, obviously), make sure this user has valid tokens
* before bothering with the RPC. */
struct unixuser *tu;
- extern struct unixuser *afs_FindUser();
tu = afs_FindUser(areq->uid, avc->fid.Cell, READ_LOCK);
if (!tu) {
return (arights & avc->anyAccess);
{
afs_int32 code;
struct vrequest treq;
- extern struct unixuser *afs_FindUser();
struct unixuser *au;
int inited = 0;
OSI_VC_CONVERT(avc);
code = afs_lookup(adp, aname, avcp, NULL, 0, NULL, acred);
#endif /* AFS_SGI64_ENV */
#else /* SUN5 || SGI */
+#if defined(UKERNEL)
+ code = afs_lookup(adp, aname, avcp, acred, 0);
+#else /* UKERNEL */
code = afs_lookup(adp, aname, avcp, acred);
+#endif /* UKERNEL */
#endif /* SUN5 || SGI */
#endif /* !(AFS_OSF_ENV || AFS_DARWIN_ENV) */
goto done;
int
#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
-afs_link(OSI_VC_ARG(adp), avc, aname, acred)
+afs_link(OSI_VC_DECL(adp), struct vcache *avc, char *aname,
+ struct AFS_UCRED *acred)
#else
-afs_link(avc, OSI_VC_ARG(adp), aname, acred)
+afs_link(struct vcache *avc, OSI_VC_DECL(adp), char *aname,
+ struct AFS_UCRED *acred)
#endif
- OSI_VC_DECL(adp);
- struct vcache *avc;
- char *aname;
- struct AFS_UCRED *acred;
{
struct vrequest treq;
register struct dcache *tdc;
#else
#define DIRPAD 3
#endif
-/**
- * A few definitions. This is until we have a proper header file
- * which ahs prototypes for all functions
- */
-extern struct DirEntry *afs_dir_GetBlob();
/*
* AFS readdir vnodeop and bulk stat support.
*/
#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
int
-afs_readdir_type(avc, ade)
- struct DirEntry *ade;
- struct vcache *avc;
+afs_readdir_type(struct vcache *avc, struct DirEntry *ade)
{
struct VenusFid tfid;
struct vcache *tvc;
#endif
char bufofzeros[64]; /* gotta fill with something */
-int
-afs_readdir_move(de, vc, auio, slen, rlen, off)
- struct DirEntry *de;
- struct vcache *vc;
- struct uio *auio;
- int slen;
#ifdef AFS_SGI65_ENV
- ssize_t rlen;
+int
+afs_readdir_move(struct DirEntry *de, struct vcache *vc, struct uio *auio,
+ int slen, ssize_t rlen, afs_size_t off)
#else
- int rlen;
+int
+afs_readdir_move(struct DirEntry *de, struct vcache *vc, struct uio *auio,
+ int slen, int rlen, afs_size_t off)
#endif
- afs_size_t off;
{
int code = 0;
struct volume *tvp;
*/
void
-afs_bulkstat_send(avc, req)
- struct vcache *avc;
- struct vrequest *req;
+afs_bulkstat_send(struct vcache *avc, struct vrequest *req)
{
afs_rd_stash_i = 0;
}
int
#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-afs_readdir(OSI_VC_ARG(avc), auio, acred, eofp)
- int *eofp;
+afs_readdir(OSI_VC_DECL(avc), struct uio *auio, struct AFS_UCRED *acred,
+ int *eofp)
#else
#if defined(AFS_HPUX100_ENV)
-afs_readdir2(OSI_VC_ARG(avc), auio, acred)
+afs_readdir2(OSI_VC_DECL(avc), struct uio *auio, struct AFS_UCRED *acred)
#else
-afs_readdir(OSI_VC_ARG(avc), auio, acred)
+afs_readdir(OSI_VC_DECL(avc), struct uio *auio, struct AFS_UCRED *acred)
#endif
#endif
- OSI_VC_DECL(avc);
- struct uio *auio;
- struct AFS_UCRED *acred;
{
struct vrequest treq;
register struct dcache *tdc;
#if defined(AFS_HPUX_ENV) || defined(AFS_OSF_ENV)
#ifdef AFS_OSF_ENV
-afs1_readdir(avc, auio, acred, eofp)
- int *eofp;
+int
+afs1_readdir(struct vcache *avc, struct uio *auio, struct AFS_UCRED *acred,
+ int *eofp)
#else
-afs1_readdir(avc, auio, acred)
+int
+afs1_readdir(struct vcache *avc, struct uio *auio, struct AFS_UCRED *acred)
#endif
- struct vcache *avc;
- struct uio *auio;
- struct AFS_UCRED *acred;
{
struct vrequest treq;
register struct dcache *tdc;
afs_Wire(avc, areq)
#else /* AFS_OSF_ENV */
static void
-FetchWholeEnchilada(avc, areq)
+FetchWholeEnchilada(register struct vcache *avc, struct vrequest *areq)
#endif
- struct vrequest *areq;
- register struct vcache *avc;
{
register afs_int32 nextChunk;
register struct dcache *tdc;
* Tests whether file is wired down, after unwiring the file if it
* is found to be inactive (ie not open and not being paged from).
*/
-afs_IsWired(avc)
- register struct vcache *avc;
+afs_IsWired(register struct vcache *avc)
{
if (avc->states & CWired) {
if (osi_Active(avc)) {
/* Note that we don't set CDirty here, this is OK because the unlink
* RPC is called synchronously */
int
-afs_remove(OSI_VC_ARG(adp), aname, acred)
- OSI_VC_DECL(adp);
- char *aname;
- struct AFS_UCRED *acred;
+afs_remove(OSI_VC_DECL(adp), char *aname, struct AFS_UCRED *acred)
{
struct vrequest treq;
register struct dcache *tdc;
-int
#if defined(AFS_SUN5_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-afs_ustrategy(abp, credp)
- struct AFS_UCRED *credp;
+int afs_ustrategy(register struct buf *abp, struct AFS_UCRED *credp)
#else
-afs_ustrategy(abp)
+int afs_ustrategy(register struct buf *abp)
#endif
- register struct buf *abp;
{
register afs_int32 code;
struct uio tuio;
/* don't set CDirty in here because RPC is called synchronously */
-int afs_symlink
- (OSI_VC_ARG(adp), aname, attrs, atargetName, acred)
- OSI_VC_DECL(adp);
- char *atargetName;
- char *aname;
- struct vattr *attrs;
- struct AFS_UCRED *acred;
+int
+afs_symlink(OSI_VC_DECL(adp), char *aname, struct vattr *attrs,
+ char *atargetName, struct AFS_UCRED *acred)
{
afs_uint32 now = 0;
struct vrequest treq;
}
int
-afs_readlink(OSI_VC_ARG(avc), auio, acred)
- OSI_VC_DECL(avc);
- struct uio *auio;
- struct AFS_UCRED *acred;
+afs_readlink(OSI_VC_DECL(avc), struct uio *auio, struct AFS_UCRED *acred)
{
register afs_int32 code;
struct vrequest treq;
/* handle any closing cleanup stuff */
int
-#ifdef AFS_SGI_ENV
-afs_close(OSI_VC_ARG(avc), aflags, lastclose,
-#if !defined(AFS_SGI65_ENV)
- offset,
-#endif
- acred
-#if defined(AFS_SGI64_ENV) && !defined(AFS_SGI65_ENV)
- , flp
-#endif
- )
- lastclose_t lastclose;
-#if !defined(AFS_SGI65_ENV)
- off_t offset;
-#if defined(AFS_SGI64_ENV)
- struct flid *flp;
-#endif
-#endif
+#if defined(AFS_SGI65_ENV)
+afs_close(OSI_VC_DECL(avc), afs_int32 aflags, lastclost_t lastclose,
+ struct AFS_UCRED *acred)
+#elif defined(AFS_SGI64_ENV)
+afs_close(OSI_VC_DECL(avc), afs_int32 aflags, lastclose_t lastclose,
+ off_t offset, struct AFS_UCRED *acred, struct flid *flp)
+#elif defined(AFS_SGI_ENV)
+afs_close(OSI_VC_DECL(avc), afs_int32 aflags, lastclose_t lastclose
+ off_t offset, struct AFS_UCRED *acred)
#elif defined(AFS_SUN5_ENV)
-afs_close(OSI_VC_ARG(avc), aflags, count, offset, acred)
- offset_t offset;
- int count;
+afs_close(OSI_VC_DECL(avc), afs_int32 aflags, int count, offset_t offset,
+ struct AFS_UCRED *acred)
#else
-afs_close(OSI_VC_ARG(avc), aflags, acred)
+afs_close(OSI_VC_DECL(avc), afs_int32 aflags, struct AFS_UCRED *acred)
#endif
- OSI_VC_DECL(avc);
- afs_int32 aflags;
- struct AFS_UCRED *acred;
{
register afs_int32 code;
register struct brequest *tb;
static int
afs_InitSetup(int preallocs)
{
- extern void afs_InitStats();
int code;
if (afs_InitSetup_done)
#endif
}
-/* leaving as is, probably will barf if we add prototypes here since it's likely being called
-with partial list */
int
-afs_syscall_call(parm, parm2, parm3, parm4, parm5, parm6)
- long parm, parm2, parm3, parm4, parm5, parm6;
+afs_syscall_call(long parm, long parm2, long parm3, long parm4, long parm5, long parm6)
{
afs_int32 code = 0;
#if defined(AFS_SGI61_ENV) || defined(AFS_SUN57_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
* Terminate the AFSDB handler, used on shutdown.
*/
void
-afs_StopAFSDB()
+afs_StopAFSDB(void)
{
if (afsdb_handler_running) {
afs_osi_Wakeup(&afsdb_req);
* Perform whatever initialization is necessary.
*/
void
-afs_CellInit()
+afs_CellInit(void)
{
AFS_RWLOCK_INIT(&afs_xcell, "afs_xcell");
#ifdef AFS_AFSDB_ENV
* Called on shutdown, should deallocate memory, etc.
*/
void
-shutdown_cell()
+shutdown_cell(void)
{
struct afs_q *cq, *tq;
struct cell *tc;
int dcacheDisabled = 0;
-static int afs_UFSCacheFetchProc(), afs_UFSCacheStoreProc();
+static int afs_UFSCacheFetchProc(struct rx_call *, struct osi_file *,
+ afs_size_t, struct dcache *,
+ struct vcache *, afs_size_t *,
+ afs_size_t *, afs_int32);
+
+static int afs_UFSCacheStoreProc(struct rx_call *, struct osi_file *,
+ afs_int32, struct vcache *,
+ int *, afs_size_t *,
+ afs_size_t *);
+
struct afs_cacheOps afs_UfsCacheOps = {
#if defined(LINUX_USE_FH)
osi_UFSOpen_fh,
* Set up a cell for dynroot if it's not there yet.
*/
static int
-afs_dynrootCellInit()
+afs_dynrootCellInit(void)
{
if (!afs_dynrootCell) {
afs_int32 cellHosts[MAXCELLHOSTS];
/* probably needed if lock_trace is enabled - should ifdef */
int afs_trclock = 0;
-void Lock_Obtain();
-void Lock_ReleaseR();
-void Lock_ReleaseW();
+void Lock_ReleaseR(struct afs_lock *lock);
+void Lock_ReleaseW(struct afs_lock *lock);
void
Lock_Init(register struct afs_lock *lock)
afs_lock_t afs_xnfspag /*, afs_xnfsreq */ ;
extern struct afs_exporter *afs_nfsexporter;
-/* Creates an nfsclientpag structure for the (uid, host) pair if one doesn't exist. RefCount is incremented and it's time stamped. */
+/* Creates an nfsclientpag structure for the (uid, host) pair if one doesn't
+ * exist. RefCount is incremented and it's time stamped. */
static struct nfsclientpag *
-afs_GetNfsClientPag(uid, host)
- register afs_int32 uid, host;
+afs_GetNfsClientPag(register afs_int32 uid, register afs_int32 host)
{
register struct nfsclientpag *np;
register afs_int32 i, now;
}
-/* Return the nfsclientpag structure associated with the (uid, host) or {pag, host} pair, if pag is nonzero. RefCount is incremented and it's time stamped. */
+/* Return the nfsclientpag structure associated with the (uid, host) or
+ * {pag, host} pair, if pag is nonzero. RefCount is incremented and it's
+ * time stamped. */
static struct nfsclientpag *
-afs_FindNfsClientPag(uid, host, pag)
- register afs_int32 uid, host, pag;
+afs_FindNfsClientPag(afs_int32 uid, afs_int32 host, afs_int32 pag)
{
register struct nfsclientpag *np;
register afs_int32 i;
afs_nfsexporter->exp_stats.calls++;
if (!(afs_nfsexporter->exp_states & EXP_EXPORTED)) {
- /* No afs requests accepted as long as EXPORTED flag is turned 'off'. Set/Reset via a pioctl call (fs exportafs). Note that this is on top of the /etc/exports nfs requirement (i.e. /afs must be exported to all or whomever there too!)
+ /* No afs requests accepted as long as EXPORTED flag is turned 'off'.
+ * Set/Reset via a pioctl call (fs exportafs). Note that this is on
+ * top of the /etc/exports nfs requirement (i.e. /afs must be
+ * exported to all or whomever there too!)
*/
afs_nfsexporter->exp_stats.rejectedcalls++;
return EINVAL;
if ((afs_nfsexporter->exp_states & EXP_CLIPAGS))
pag = NOPAG;
if (!np) {
- /* Even if there is a "good" pag coming in we don't accept it if no nfsclientpag struct exists for the user since that would mean that the translator rebooted and therefore we ignore all older pag values */
+ /* Even if there is a "good" pag coming in we don't accept it if no
+ * nfsclientpag struct exists for the user since that would mean
+ * that the translator rebooted and therefore we ignore all older
+ * pag values
+ */
#ifdef AFS_OSF_ENV
if (code = setpag(u.u_procp, cred, -1, &pag, 0)) { /* XXX u.u_procp is a no-op XXX */
#else
int
-afs_nfsclient_stats(export)
- register struct afs_exporter *export;
+afs_nfsclient_stats(register struct afs_exporter *export)
{
- /* Nothing much to do here yet since most important stats are collected directly in the afs_exporter structure itself */
+ /* Nothing much to do here yet since most important stats are collected
+ * directly in the afs_exporter structure itself */
AFS_STATCNT(afs_nfsclient_stats);
return 0;
}
}
void
-afs_osi_UnmaskUserLoop()
+afs_osi_UnmaskUserLoop(void)
{
#ifdef AFS_DARWIN_ENV
afs_osi_fullSigRestore();
static int Prefetch(char *apath, struct afs_ioctl *adata, int afollow,
struct AFS_UCRED *acred);
+typedef int (*pioctlFunction) (struct vcache *, int, struct vrequest *,
+ char *, char *, afs_int32, afs_int32 *,
+ struct AFS_UCRED **);
-static int (*(VpioctlSw[])) () = {
+static pioctlFunction VpioctlSw[] = {
PBogus, /* 0 */
PSetAcl, /* 1 */
PGetAcl, /* 2 */
PGetVnodeXStatus2, /* 69 - get caller access and some vcache status */
};
-static int (*(CpioctlSw[])) () = {
+static pioctlFunction CpioctlSw[] = {
PBogus, /* 0 */
PNewAlias, /* 1 -- create new cell alias */
PListAliases, /* 2 -- list cell aliases */
#ifdef AFS_AIX32_ENV
#ifdef AFS_AIX51_ENV
#ifdef __64BIT__
-kioctl(fdes, com, arg, ext, arg2, arg3)
+int
+kioctl(int fdes, int com, caddr_t arg, caddr_t ext, caddr_t arg2,
+ caddr_t arg3)
#else /* __64BIT__ */
-kioctl32(fdes, com, arg, ext, arg2, arg3)
+int
+kioctl32(int fdes, int com, caddr_t arg, caddr_t ext, caddr_t arg2,
+ caddr_t arg3)
#endif /* __64BIT__ */
- caddr_t arg2, arg3;
#else
-kioctl(fdes, com, arg, ext)
+int
+kioctl(int fdes, int com, caddr_t arg, caddr_t ext)
#endif
- int fdes, com;
- caddr_t arg, ext;
{
struct a {
int fd, com;
int arg;
};
-afs_xioctl(uap, rvp)
- struct afs_ioctl_sys *uap;
- rval_t *rvp;
+int
+afs_xioctl(struct afs_ioctl_sys *uap, rval_t *rvp)
{
#elif defined(AFS_OSF_ENV)
-afs_xioctl(p, args, retval)
- struct proc *p;
- void *args;
- long *retval;
+int
+afs_xioctl(struct proc *p, void *args, long *retval)
{
struct a {
long fd;
#elif defined(AFS_FBSD50_ENV)
#define arg data
int
-afs_xioctl(td, uap, retval)
- struct thread *td;
- register struct ioctl_args *uap;
- register_t *retval;
+afs_xioctl(struct thread *td, register struct ioctl_args *uap,
+ register_t *retval)
{
struct proc *p = td->td_proc;
#elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
};
int
-afs_xioctl(p, uap, retval)
- struct proc *p;
- register struct ioctl_args *uap;
- register_t *retval;
+afs_xioctl(struct proc *p, register struct ioctl_args *uap, register_t *retval)
{
#elif defined(AFS_LINUX22_ENV)
struct afs_ioctl_sys {
}
#elif defined(AFS_OSF_ENV)
-afs_pioctl(p, args, retval)
- struct proc *p;
- void *args;
- int *retval;
+afs_pioctl(struct proc *p, void *args, int *retval)
{
struct a {
char *path;
#elif defined(AFS_FBSD50_ENV)
int
-afs_pioctl(td, args, retval)
- struct thread *td;
- void *args;
- int *retval;
+afs_pioctl(struct thread *td, void *args, int *retval)
{
struct a {
char *path;
#elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
int
-afs_pioctl(p, args, retval)
- struct proc *p;
- void *args;
- int *retval;
+afs_pioctl(struct proc *p, void *args, int *retval)
{
struct a {
char *path;
int
#ifdef AFS_SUN5_ENV
-afs_syscall_pioctl(path, com, cmarg, follow, rvp, credp)
- rval_t *rvp;
- struct AFS_UCRED *credp;
+afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, int follow,
+ rval_t *vvp, struct AFS_UCRED *credp)
#else
#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-afs_syscall_pioctl(path, com, cmarg, follow, credp)
- struct AFS_UCRED *credp;
+afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, int follow,
+ struct AFS_UCRED *credp)
#else
-afs_syscall_pioctl(path, com, cmarg, follow)
+afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, int follow)
#endif
#endif
- char *path;
- unsigned int com;
- caddr_t cmarg;
- int follow;
{
struct afs_ioctl data;
#ifdef AFS_NEED_CLIENTCONTEXT
register afs_int32 function, device;
afs_int32 inSize, outSize, outSizeMax;
char *inData, *outData;
- int (*(*pioctlSw)) ();
+ pioctlFunction *pioctlSw;
int pioctlSwSize;
struct afs_fakestat_state fakestate;
static int debugsetsp = 0;
static int
-afs_setsprefs(sp, num, vlonly)
- struct spref *sp;
- unsigned int num;
- unsigned int vlonly;
+afs_setsprefs(struct spref *sp, unsigned int num, unsigned int vlonly)
{
struct srvAddr *sa;
int i, j, k, matches, touchedSize;
extern void shutdown_osinet(void);
/* afs_osi_pag.c */
-extern int afs_setpag();
+#if defined(AFS_SUN5_ENV)
+extern int afs_setpag(struct AFS_UCRED **credpp);
+#elif defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+extern int afs_setpag(struct proc *p, void *args, int *retval);
+#else
+extern int afs_setpag(void);
+#endif
+
extern afs_uint32 genpag(void);
extern afs_uint32 getpag(void);
#if defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
/* ARCH/osi_inode.c */
-extern int afs_syscall_icreate();
-extern int afs_syscall_iopen();
-extern int afs_syscall_iincdec();
-
+#ifdef AFS_SUN5_ENV
+extern int afs_syscall_icreate(dev_t, long, long, long, long, long,
+ rval_t *, struct AFS_UCRED *);
+extern int afs_syscall_iopen(dev_t, int, int, rval_t *, struct AFS_UCRED *);
+extern int afs_syscall_iincdec(dev_t, int, int, int, rval_t *,
+ struct AFS_UCRED *);
+#elif defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+extern int afs_syscall_icreate(long, long, long, long, long, long, long*);
+extern int afs_syscall_iopen(int dev, int inode, int usrmod, long *retval);
+extern int afs_syscall_iincdec(int dev, int inode, int inode_p1, int amount);
+#else
+extern int afs_syscall_icreate(long, long, long, long, long, long);
+extern int afs_syscall_iopen(int, int, int);
+extern int afs_syscall_iincdec(int, int, int, int);
+#endif
/* ARCH/osi_file.c */
extern int afs_osicred_initialized;
extern struct vfs_ubcops afs_ubcops;
#endif
#endif
+extern int afs_inactive(struct vcache *avc, struct AFS_UCRED *acred);
/* afs_osifile.c */
extern short afs_waitForeverCount;
extern afs_int32 afs_showflags;
extern int afs_defaultAsynchrony;
-extern int afs_syscall_pioctl();
+#ifdef AFS_SUN5_ENV
+extern int afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg,
+ int follow, rval_t *rvp, struct AFS_UCRED *credp);
+#elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+extern int afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg,
+ int follow, struct AFS_UCRED *credp);
+#else
+extern int afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg,
+ int follow);
+#endif
+extern int HandleIoctl(register struct vcache *avc, register afs_int32 acom,
+ struct afs_ioctl *adata);
+
/* afs_segments.c */
extern int afs_StoreMini(register struct vcache *avc, struct vrequest *areq);
register struct dcache *adc,
register AFSFetchStatus * astat, register int aincr);
+/* VNOPS/afs_vnop_dirops.c */
+
+extern int afs_mkdir(OSI_VC_DECL(adp), char *aname, struct vattr *attrs,
+ register struct vcache **avcp, struct AFS_UCRED *acred);
+#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
+extern int afs_rmdir(OSI_VC_DECL(adp), char *aname, struct vnode *cdirp,
+ struct AFS_UCRED *acred);
+#else
+extern int afs_rmdir(OSI_VC_DECL(adp), char *aname, struct AFS_UCRED *acred);
+#endif
+
+struct fid;
+/* VNOPS/afs_vnop_fid.c */
+#if !defined(AFS_ATHENA_ENV)
+#ifdef AFS_AIX41_ENV
+int afs_fid(OSI_VC_DECL(avc), struct fid *fidpp, struct ucred *credp);
+#elif defined(AFS_OSF_ENV) || defined(AFS_SUN54_ENV)
+int afs_fid(OSI_VC_DECL(avc), struct fid *fidpp);
+#else
+int afs_fid(OSI_VC_DECL(avc), struct fid **fidpp);
+#endif /* AFS_AIX41_ENV */
+#endif
/* VNOPS/afs_vnop_flock.c */
+extern afs_int32 lastWarnTime;
+
extern void lockIdSet(struct AFS_FLOCK *flock, struct SimpleLocks *slp,
int clid);
extern int HandleFlock(register struct vcache *avc, int acom,
struct vrequest *areq, pid_t clid, int onlymine);
+#ifdef AFS_OSF_ENV
+extern int afs_lockctl(struct vcache * avc, struct eflock * af, int flag,
+ struct AFS_UCRED * acred, pid_t clid, off_t offset);
+#elif defined(AFS_SGI_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+extern int afs_lockctl(struct vcache * avc, struct AFS_FLOCK * af, int acmd,
+ struct AFS_UCRED * acred, pid_t clid);
+#else
+extern int afs_lockctl(struct vcache * avc, struct AFS_FLOCK * af, int acmd,
+ struct AFS_UCRED * acred);
+#endif
+/* VNOPS/afs_vnop_link.c */
+#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
+extern int afs_link(OSI_VC_DECL(adp), struct vcache *avc, char *aname,
+ struct AFS_UCRED *acred);
+#else
+extern int afs_link(struct vcache *avc, OSI_VC_DECL(adp), char *aname,
+ struct AFS_UCRED *acred);
+#endif
/* VNOPS/afs_vnop_lookup.c */
extern int EvalMountPoint(register struct vcache *avc, struct vcache *advc,
struct sysname_info *state);
extern int afs_DoBulkStat(struct vcache *adp, long dirCookie,
struct vrequest *areqp);
-extern int afs_lookup();
-
-
+#ifdef AFS_OSF_ENV
+extern int afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp,
+ struct AFS_UCRED *acred, int opflag, int wantparent);
+#elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
+extern int afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp,
+ struct pathname *pnp, int flags, struct vnode *rdir,
+ struct AFS_UCRED *acred);
+#elif defined(UKERNEL)
+extern int afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp,
+ struct AFS_UCRED *acred, int flags);
+#else
+extern int afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp,
+ struct AFS_UCRED *acred);
+#endif
+
/* VNOPS/afs_vnop_open.c */
#ifdef AFS_SGI64_ENV
extern int afs_open(bhv_desc_t * bhv, struct vcache **avcp, afs_int32 aflags,
/* VNOPS/afs_vnop_readdir.c */
extern int afs_rd_stash_i;
-
+#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+extern int afs_readdir(OSI_VC_DECL(avc), struct uio *auio,
+ struct AFS_UCRED *acred, int *eofp);
+#elif defined(AFS_HPUX100_ENV)
+extern int afs_readdir2(OIS_VC_DECL(avc), struct uio *auio,
+ struct AFS_UCRED *acred);
+#else
+extern int afs_readdir(OSI_VC_DECL(avc), struct uio *auio,
+ struct AFS_UCRED *acred);
+#endif
/* VNOPS/afs_vnop_remove.c */
extern int afsremove(register struct vcache *adp, register struct dcache *tdc,
register struct vcache *tvc, char *aname,
struct AFS_UCRED *acred, struct vrequest *treqp);
extern int afs_remunlink(register struct vcache *avc, register int doit);
-
+extern int afs_remove(OSI_VC_DECL(adp), char *aname, struct AFS_UCRED *acred);
+extern char *afs_newname(void);
/* VNOPS/afs_vnop_rename.c */
extern int afsrename(struct vcache *aodp, char *aname1, struct vcache *andp,
char *aname2, struct AFS_UCRED *acred,
struct vrequest *areq);
-
+#ifdef AFS_SGI_ENV
+extern int afs_rename(OSI_VC_DECL(aodp), char *aname1, struct vcache *andp,
+ char *aname2, struct pathname *npnp,
+ struct AFS_UCRED *acred);
+#else
+extern int afs_rename(OSI_VC_DECL(aodp), char *aname1, struct vcache *andp,
+ char *aname2, struct AFS_UCRED *acred);
+#endif
+
+/* VNOPS/afs_vnop_strategy.c */
+#if defined(AFS_SUN5_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+extern int afs_ustrategy(register struct buf *adp, struct AFS_UCRED *credp);
+#else
+extern int afs_ustrategy(register struct buf *adp);
+#endif
/* VNOPS/afs_vnop_symlink.c */
extern int afs_MemHandleLink(register struct vcache *avc,
struct vrequest *areq);
extern int afs_UFSHandleLink(register struct vcache *avc,
struct vrequest *areq);
-
-/* VNOPS/afs_vnop_flock.c */
-extern afs_int32 lastWarnTime;
+extern int afs_symlink(OSI_VC_DECL(adp), char *aname,
+ struct vattr *attrs, char *atargetName,
+ struct AFS_UCRED *acred);
+extern int afs_readlink(OSI_VC_DECL(avc), struct uio *auio,
+ struct AFS_UCRED *acred);
/* VNOPS/afs_vnop_write.c */
extern int afs_MemWrite(register struct vcache *avc, struct uio *auio,
struct vrequest *areq);
extern int afs_closex(register struct file *afd);
-/* other VNOPS (please fix these) */
-extern int afs_close();
-extern int HandleIoctl();
-extern int afs_fsync();
-extern int afs_remove();
-extern int afs_link();
-extern int afs_rename();
-extern int afs_mkdir();
-extern int afs_rmdir();
-extern int afs_symlink();
-extern int afs_readdir();
-extern int afs_readlink();
-extern int afs_ustrategy();
-extern int afs_lockctl();
+#ifdef AFS_SGI65_ENV
+extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags,
+ lastclose_t lastclose, struct AFS_UCRED *acred);
+#elif defined(AFS_SGI64_ENV)
+extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags,
+ lastclose_t lastclose, off_t offset,
+ struct AFS_UCRED *acred, struct flid *flp);
+#elif defined(AFS_SGI_ENV)
+extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags,
+ lastclose_t lastclose, off_t offset,
+ struct AFS_UCRED *acred);
+#elif defined(AFS_SUN5_ENV)
+extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags, int count,
+ offset_t offset, acred);
+#else
+extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags,
+ struct AFS_UCRED *acred);
+#endif
+#ifdef AFS_OSF_ENV
+extern int afs_fsync(OSI_VC_DECL(avc), int fflags, struct AFS_UCRED *acred,
+ int waitfor);
+#elif defined(AFS_SGI65_ENV)
+extern int afs_fsync(OSI_VC_DECL(avc), int flags, struct AFS_UCRED *acred,
+ off_t start, off_t stop);
+#elif defined(AFS_SGI_ENV) || defined(AFS_SUN53_ENV)
+extern int afs_fsync(OSI_VC_DECL(avc), int flag, struct AFS_UCRED *acred);
+#else
+extern int afs_fsync(OSI_VC_DECL(avc), struct AFS_UCRED *acred);
+#endif
+
/* afs_volume.c */
extern afs_int32 afs_FVIndex;
#endif
#endif
+struct afs_exporter;
+
struct exporterops {
- int (*export_reqhandler) ();
- void (*export_hold) ();
- void (*export_rele) ();
- int (*export_sysname) ();
- void (*export_garbagecollect) ();
- int (*export_statistics) ();
- int (*export_checkhost) ();
- afs_int32 (*export_gethost) ();
+ int (*export_reqhandler) (struct afs_exporter *exp,
+ struct AFS_UCRED **cred,
+ afs_uint32 host,
+ afs_int32 pag,
+ struct afs_exporter **expp);
+ void (*export_hold) (struct afs_exporter *exp);
+ void (*export_rele) (struct afs_exporter *exp);
+ int (*export_sysname) (struct afs_exporter *exp,
+ char *inname,
+ char **outname,
+ int *num,
+ int allpags);
+ void (*export_garbagecollect) (struct afs_exporter *exp,
+ afs_int32 param);
+ int (*export_statistics) (struct afs_exporter *exp);
+ int (*export_checkhost) (struct afs_exporter *exp, afs_int32 host);
+ afs_int32 (*export_gethost) (struct afs_exporter *exp);
};
struct exporterstats {