diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2014-10-26 03:03:35 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2014-10-26 03:03:35 +0000 |
commit | b54442ce3569bbae4fe6c3eb29b4f11962bdbd35 (patch) | |
tree | 308662ea446f92664ad72a2cba25db05c2aadc98 /usr.sbin | |
parent | ff943901944899e909d24abdb8c8f6016f29c417 (diff) |
Update to the modern RPC style with different names for server and client
stubs (they have different prototypes, after all).
Fill in missing prototypes.
Use void* arguments on closure-style callbacks, with local variables of
the expected type.
Keep deleting unnecessary casts.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/amd/amd/afs_ops.c | 3 | ||||
-rw-r--r-- | usr.sbin/amd/amd/amq_subr.c | 28 | ||||
-rw-r--r-- | usr.sbin/amd/amd/clock.c | 8 | ||||
-rw-r--r-- | usr.sbin/amd/amd/info_file.c | 4 | ||||
-rw-r--r-- | usr.sbin/amd/amd/info_nis.c | 6 | ||||
-rw-r--r-- | usr.sbin/amd/amd/info_union.c | 4 | ||||
-rw-r--r-- | usr.sbin/amd/amd/mapc.c | 7 | ||||
-rw-r--r-- | usr.sbin/amd/amd/mntfs.c | 12 | ||||
-rw-r--r-- | usr.sbin/amd/amd/nfs_ops.c | 22 | ||||
-rw-r--r-- | usr.sbin/amd/amd/nfs_start.c | 7 | ||||
-rw-r--r-- | usr.sbin/amd/amd/srvr_afs.c | 6 | ||||
-rw-r--r-- | usr.sbin/amd/amd/srvr_nfs.c | 20 | ||||
-rw-r--r-- | usr.sbin/amd/include/am.h | 16 | ||||
-rw-r--r-- | usr.sbin/amd/rpcx/amq.h | 49 | ||||
-rw-r--r-- | usr.sbin/amd/rpcx/amq_clnt.c | 8 | ||||
-rw-r--r-- | usr.sbin/amd/rpcx/amq_svc.c | 20 | ||||
-rw-r--r-- | usr.sbin/amd/rpcx/mount.h | 36 | ||||
-rw-r--r-- | usr.sbin/amd/rpcx/nfs_prot.h | 96 | ||||
-rw-r--r-- | usr.sbin/amd/rpcx/nfs_prot_svc.c | 45 |
19 files changed, 211 insertions, 186 deletions
diff --git a/usr.sbin/amd/amd/afs_ops.c b/usr.sbin/amd/amd/afs_ops.c index 0969b38db6e..c8ea7471504 100644 --- a/usr.sbin/amd/amd/afs_ops.c +++ b/usr.sbin/amd/amd/afs_ops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: afs_ops.c,v 1.16 2014/10/26 02:43:50 guenther Exp $ */ +/* $OpenBSD: afs_ops.c,v 1.17 2014/10/26 03:03:34 guenther Exp $ */ /* * Copyright (c) 1990 Jan-Simon Pendry @@ -102,7 +102,6 @@ mount_toplvl(char *dir, char *opts) struct sockaddr_in sin; unsigned short port; int flags; - extern nfs_fh *root_fh(); nfs_fh *fhp; char fs_hostname[MAXHOSTNAMELEN+MAXPATHLEN+1]; diff --git a/usr.sbin/amd/amd/amq_subr.c b/usr.sbin/amd/amd/amq_subr.c index 551e40db437..f99e6904b02 100644 --- a/usr.sbin/amd/amd/amq_subr.c +++ b/usr.sbin/amd/amd/amq_subr.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)amq_subr.c 8.1 (Berkeley) 6/6/93 - * $Id: amq_subr.c,v 1.14 2014/10/26 02:43:50 guenther Exp $ + * $Id: amq_subr.c,v 1.15 2014/10/26 03:03:34 guenther Exp $ */ /* @@ -43,8 +43,10 @@ #include "amq.h" #include <ctype.h> +bool_t xdr_amq_mount_info_qelem(XDR *, qelem *); + void * -amqproc_null_1(void *argp, struct svc_req *rqstp) +amqproc_null_1_svc(void *argp, struct svc_req *rqstp) { static char res; @@ -55,7 +57,7 @@ amqproc_null_1(void *argp, struct svc_req *rqstp) * Return a sub-tree of mounts */ amq_mount_tree_p * -amqproc_mnttree_1(void *argp, struct svc_req *rqstp) +amqproc_mnttree_1_svc(void *argp, struct svc_req *rqstp) { static am_node *mp; @@ -67,7 +69,7 @@ amqproc_mnttree_1(void *argp, struct svc_req *rqstp) * Unmount a single node */ void * -amqproc_umnt_1(void *argp, struct svc_req *rqstp) +amqproc_umnt_1_svc(void *argp, struct svc_req *rqstp) { static char res; @@ -82,7 +84,7 @@ amqproc_umnt_1(void *argp, struct svc_req *rqstp) * Return global statistics */ amq_mount_stats * -amqproc_stats_1(void *argp, struct svc_req *rqstp) +amqproc_stats_1_svc(void *argp, struct svc_req *rqstp) { return (amq_mount_stats *) &amd_stats; } @@ -91,7 +93,7 @@ amqproc_stats_1(void *argp, struct svc_req *rqstp) * Return the entire tree of mount nodes */ amq_mount_tree_list * -amqproc_export_1(void *argp, struct svc_req *rqstp) +amqproc_export_1_svc(void *argp, struct svc_req *rqstp) { static amq_mount_tree_list aml; @@ -102,7 +104,7 @@ amqproc_export_1(void *argp, struct svc_req *rqstp) } int * -amqproc_setopt_1(void *argp, struct svc_req *rqstp) +amqproc_setopt_1_svc(void *argp, struct svc_req *rqstp) { static int rc; @@ -146,7 +148,7 @@ amqproc_setopt_1(void *argp, struct svc_req *rqstp) } amq_mount_info_list * -amqproc_getmntfs_1(void *argp, struct svc_req *rqstp) +amqproc_getmntfs_1_svc(void *argp, struct svc_req *rqstp) { extern qelem mfhead; return (amq_mount_info_list *) &mfhead; /* XXX */ @@ -176,7 +178,7 @@ struct svc_req *rqstp; } int * -amqproc_mount_1(argp, rqstp) +amqproc_mount_1_svc(argp, rqstp) void *argp; struct svc_req *rqstp; { @@ -226,7 +228,7 @@ struct svc_req *rqstp; * Disable "amq -M" functionality since it is inherently insecure. */ int * -amqproc_mount_1(void *argp, struct svc_req *rqstp) +amqproc_mount_1_svc(void *argp, struct svc_req *rqstp) { static int rc; char *s = *(amq_string *) argp; @@ -239,7 +241,7 @@ amqproc_mount_1(void *argp, struct svc_req *rqstp) #endif amq_string * -amqproc_getvers_1(void *argp, struct svc_req *rqstp) +amqproc_getvers_1_svc(void *argp, struct svc_req *rqstp) { static amq_string res; @@ -274,7 +276,7 @@ xdr_amq_setopt(XDR *xdrs, amq_setopt *objp) /* * More XDR routines - Should be used for OUTPUT ONLY. */ -bool_t +static bool_t xdr_amq_mount_tree_node(XDR *xdrs, amq_mount_tree *objp) { am_node *mp = (am_node *) objp; @@ -316,7 +318,7 @@ xdr_amq_mount_tree_node(XDR *xdrs, amq_mount_tree *objp) return (TRUE); } -bool_t +static bool_t xdr_amq_mount_subtree(XDR *xdrs, amq_mount_tree *objp) { am_node *mp = (am_node *) objp; diff --git a/usr.sbin/amd/amd/clock.c b/usr.sbin/amd/amd/clock.c index 7e1da8a8760..cfbc98b2628 100644 --- a/usr.sbin/amd/amd/clock.c +++ b/usr.sbin/amd/amd/clock.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 8.1 (Berkeley) 6/6/93 - * $Id: clock.c,v 1.5 2003/06/02 23:36:51 millert Exp $ + * $Id: clock.c,v 1.6 2014/10/26 03:03:34 guenther Exp $ */ /* @@ -51,7 +51,7 @@ typedef struct callout callout; struct callout { callout *c_next; /* List of callouts */ - void (*c_fn)(); /* Function to call */ + void (*c_fn)(void *); /* Function to call */ void *c_closure; /* Closure to pass to call */ time_t c_time; /* Time of call */ int c_id; /* Unique identifier */ @@ -104,7 +104,7 @@ free_callout(callout *cp) * (*fn)(closure) will be called at clocktime() + secs */ int -timeout(unsigned int secs, void (*fn)(), void *closure) +timeout(unsigned int secs, void (*fn)(void *), void *closure) { callout *cp, *cp2; time_t t = clocktime() + secs; @@ -205,7 +205,7 @@ softclock(void) * function will call timeout() * and try to allocate a callout */ - void (*fn)() = cp->c_fn; + void (*fn)(void *) = cp->c_fn; void *closure = cp->c_closure; callouts.c_next = cp->c_next; diff --git a/usr.sbin/amd/amd/info_file.c b/usr.sbin/amd/amd/info_file.c index 18dcca408dd..470187cf425 100644 --- a/usr.sbin/amd/amd/info_file.c +++ b/usr.sbin/amd/amd/info_file.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)info_file.c 8.1 (Berkeley) 6/6/93 - * $Id: info_file.c,v 1.8 2014/10/20 02:33:42 guenther Exp $ + * $Id: info_file.c,v 1.9 2014/10/26 03:03:34 guenther Exp $ */ /* @@ -213,7 +213,7 @@ file_init(char *map, time_t *tp) } int -file_reload(mnt_map *m, char *map, void (*fn)()) +file_reload(mnt_map *m, char *map, void (*fn)(mnt_map *, char *, char *)) { FILE *mapf = file_open(map, (time_t *) 0); diff --git a/usr.sbin/amd/amd/info_nis.c b/usr.sbin/amd/amd/info_nis.c index 7276b09a306..cda31d6563f 100644 --- a/usr.sbin/amd/amd/info_nis.c +++ b/usr.sbin/amd/amd/info_nis.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)info_nis.c 8.1 (Berkeley) 6/6/93 - * $Id: info_nis.c,v 1.11 2014/10/20 02:33:42 guenther Exp $ + * $Id: info_nis.c,v 1.12 2014/10/26 03:03:34 guenther Exp $ */ /* @@ -86,7 +86,7 @@ determine_nis_domain(void) struct nis_callback_data { mnt_map *ncd_m; char *ncd_map; - void (*ncd_fn)(); + void (*ncd_fn)(mnt_map *, char *, char *); }; /* @@ -132,7 +132,7 @@ callback(int status, char *key, int kl, char *val, } int -nis_reload(mnt_map *m, char *map, void (*fn)()) +nis_reload(mnt_map *m, char *map, void (*fn)(mnt_map *, char *, char *)) { struct ypall_callback cbinfo; int error; diff --git a/usr.sbin/amd/amd/info_union.c b/usr.sbin/amd/amd/info_union.c index 0c2d90db204..3ab816fe79c 100644 --- a/usr.sbin/amd/amd/info_union.c +++ b/usr.sbin/amd/amd/info_union.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)info_union.c 8.1 (Berkeley) 6/6/93 - * $Id: info_union.c,v 1.8 2014/10/20 02:33:42 guenther Exp $ + * $Id: info_union.c,v 1.9 2014/10/26 03:03:34 guenther Exp $ */ /* @@ -78,7 +78,7 @@ union_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp) } int -union_reload(mnt_map *m, char *map, void (*fn)()) +union_reload(mnt_map *m, char *map, void (*fn)(mnt_map *, char *, char *)) { char *mapd = strdup(map + UNION_PREFLEN); char **v = strsplit(mapd, ':', '\"'); diff --git a/usr.sbin/amd/amd/mapc.c b/usr.sbin/amd/amd/mapc.c index 94a9e0d6b84..d6469007e74 100644 --- a/usr.sbin/amd/amd/mapc.c +++ b/usr.sbin/amd/amd/mapc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mapc.c,v 1.19 2014/10/26 02:51:47 guenther Exp $ */ +/* $OpenBSD: mapc.c,v 1.20 2014/10/26 03:03:34 guenther Exp $ */ /*- * Copyright (c) 1989 Jan-Simon Pendry @@ -282,7 +282,7 @@ mapc_add_kv(mnt_map *m, char *key, char *val) *h = n; } -void +static void mapc_repl_kv(mnt_map *m, char *key, char *val) { kv *k; @@ -508,8 +508,9 @@ mapc_find(char *map, char *opt) * Free a map. */ void -mapc_free(mnt_map *m) +mapc_free(void *arg) { + mnt_map *m = arg; /* * Decrement the reference count. * If the reference count hits zero diff --git a/usr.sbin/amd/amd/mntfs.c b/usr.sbin/amd/amd/mntfs.c index 215bbb52f12..8a27c3d8bb1 100644 --- a/usr.sbin/amd/amd/mntfs.c +++ b/usr.sbin/amd/amd/mntfs.c @@ -167,7 +167,7 @@ find_mntfs(am_ops *ops, am_opts *mo, char *mp, char *info, /* * Remember who we are restarting */ - mf2->mf_private = (void *)dup_mntfs(mf); + mf2->mf_private = dup_mntfs(mf); mf2->mf_prfree = free_mntfs; return mf2; } @@ -234,8 +234,10 @@ uninit_mntfs(mntfs *mf, int rmd) } static void -discard_mntfs(mntfs *mf) +discard_mntfs(void *arg) { + mntfs *mf = arg; + rem_que(&mf->mf_q); /* * Free memory @@ -247,7 +249,7 @@ discard_mntfs(mntfs *mf) } void -flush_mntfs() +flush_mntfs(void) { mntfs *mf; @@ -261,8 +263,10 @@ flush_mntfs() } void -free_mntfs(mntfs *mf) +free_mntfs(void *arg) { + mntfs *mf = arg; + if (--mf->mf_refc == 0) { if (mf->mf_flags & MFF_MOUNTED) { int quoted; diff --git a/usr.sbin/amd/amd/nfs_ops.c b/usr.sbin/amd/amd/nfs_ops.c index da62d818122..926dee0af89 100644 --- a/usr.sbin/amd/amd/nfs_ops.c +++ b/usr.sbin/amd/amd/nfs_ops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_ops.c,v 1.23 2014/10/26 01:22:34 guenther Exp $ */ +/* $OpenBSD: nfs_ops.c,v 1.24 2014/10/26 03:03:34 guenther Exp $ */ /*- * Copyright (c) 1990 Jan-Simon Pendry @@ -177,8 +177,10 @@ flush_nfs_fhandle_cache(fserver *fs) } static void -discard_fh(fh_cache *fp) +discard_fh(void *arg) { + fh_cache *fp = arg; + rem_que(&fp->fh_q); #ifdef DEBUG dlog("Discarding filehandle for %s:%s", fp->fh_fs->fs_host, fp->fh_path); @@ -216,7 +218,8 @@ prime_nfs_fhandle_cache(char *path, fserver *fs, fhstatus *fhbuf, void *wchan) sizeof(fp->fh_handle)); if (fp->fh_cid) untimeout(fp->fh_cid); - fp->fh_cid = timeout(FH_TTL, discard_fh, (void *)fp); + fp->fh_cid = timeout(FH_TTL, + discard_fh, fp); } else if (error == EACCES) { /* * Now decode the file handle return code. @@ -282,7 +285,7 @@ prime_nfs_fhandle_cache(char *path, fserver *fs, fhstatus *fhbuf, void *wchan) fp->fh_id = FHID_ALLOC(); fp->fh_wchan = wchan; fp->fh_error = -1; - fp->fh_cid = timeout(FH_TTL, discard_fh, (void *)fp); + fp->fh_cid = timeout(FH_TTL, discard_fh, fp); /* * If the address has changed then don't try to re-use the @@ -303,7 +306,7 @@ prime_nfs_fhandle_cache(char *path, fserver *fs, fhstatus *fhbuf, void *wchan) */ untimeout(fp->fh_cid); fp->fh_cid = timeout(error < 0 ? 2 * ALLOWED_MOUNT_TIME : FH_TTL_ERROR, - discard_fh, (void *)fp); + discard_fh, fp); fp->fh_error = error; } else { error = fp->fh_error; @@ -426,11 +429,12 @@ nfs_init(mntfs *mf) if (colon == 0) return ENOENT; - error = prime_nfs_fhandle_cache(colon+1, mf->mf_server, &fhs, (void *)mf); + error = prime_nfs_fhandle_cache(colon+1, mf->mf_server, + &fhs, mf); if (!error) { - mf->mf_private = (void *)ALLOC(fhstatus); - mf->mf_prfree = (void (*)()) free; - bcopy((void *)&fhs, mf->mf_private, sizeof(fhs)); + mf->mf_private = ALLOC(fhstatus); + mf->mf_prfree = free; + bcopy(&fhs, mf->mf_private, sizeof(fhs)); } return error; } diff --git a/usr.sbin/amd/amd/nfs_start.c b/usr.sbin/amd/amd/nfs_start.c index dd07526a2e5..c91f8996bda 100644 --- a/usr.sbin/amd/amd/nfs_start.c +++ b/usr.sbin/amd/amd/nfs_start.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)nfs_start.c 8.1 (Berkeley) 6/6/93 - * $Id: nfs_start.c,v 1.17 2014/10/20 02:33:42 guenther Exp $ + * $Id: nfs_start.c,v 1.18 2014/10/26 03:03:34 guenther Exp $ */ #include "am.h" @@ -53,9 +53,6 @@ extern int select_intr_valid; extern SVCXPRT *svcudp2_create(int); #endif /* HAS_TFS */ -extern void nfs_program_2(); -extern void amq_program_1(); - unsigned short nfs_port; SVCXPRT *nfsxprt, *lnfsxprt; SVCXPRT *amqp, *lamqp; @@ -154,7 +151,7 @@ do_select(sigset_t *mask, sigset_t *omask, int fds, fd_set *fdp, * the RPC input queue. */ static int -rpc_pending_now() +rpc_pending_now(void) { struct timeval tvv; int nsel; diff --git a/usr.sbin/amd/amd/srvr_afs.c b/usr.sbin/amd/amd/srvr_afs.c index 64493320130..f39c356f8b8 100644 --- a/usr.sbin/amd/amd/srvr_afs.c +++ b/usr.sbin/amd/amd/srvr_afs.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)srvr_afs.c 8.1 (Berkeley) 6/6/93 - * $Id: srvr_afs.c,v 1.4 2003/06/02 23:36:51 millert Exp $ + * $Id: srvr_afs.c,v 1.5 2014/10/26 03:03:34 guenther Exp $ */ /* @@ -95,8 +95,10 @@ wakeup_srvr(fserver *fs) * Called when final ttl of server has expired */ static void -timeout_srvr(fserver *fs) +timeout_srvr(void *arg) { + fserver *fs = arg; + /* * If the reference count is still zero then * we are free to remove this node diff --git a/usr.sbin/amd/amd/srvr_nfs.c b/usr.sbin/amd/amd/srvr_nfs.c index f0e26ad0f5f..4b65725f105 100644 --- a/usr.sbin/amd/amd/srvr_nfs.c +++ b/usr.sbin/amd/amd/srvr_nfs.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)srvr_nfs.c 8.1 (Berkeley) 6/6/93 - * $Id: srvr_nfs.c,v 1.8 2014/10/26 02:43:50 guenther Exp $ + * $Id: srvr_nfs.c,v 1.9 2014/10/26 03:03:34 guenther Exp $ */ /* @@ -226,7 +226,7 @@ call_portmap(fserver *fs, AUTH *auth, unsigned long prog, return error; } -static void nfs_keepalive(fserver *); +static void nfs_keepalive(void *); static void recompute_portmap(fserver *fs) @@ -313,7 +313,7 @@ nfs_pinged(void *pkt, int len, struct sockaddr_in *sp, * Adjust ping interval */ untimeout(fs->fs_cid); - fs->fs_cid = timeout(fs->fs_pinger, nfs_keepalive, (void *)fs); + fs->fs_cid = timeout(fs->fs_pinger, nfs_keepalive, fs); /* * Update ttl for this server @@ -354,8 +354,10 @@ nfs_pinged(void *pkt, int len, struct sockaddr_in *sp, * Called when no ping-reply received */ static void -nfs_timed_out(fserver *fs) +nfs_timed_out(void *arg) { + fserver *fs = arg; + nfs_private *np = (nfs_private *) fs->fs_private; /* @@ -425,8 +427,10 @@ nfs_timed_out(fserver *fs) * Keep track of whether a server is alive */ static void -nfs_keepalive(fserver *fs) +nfs_keepalive(void *arg) { + fserver *fs = arg; + int error; nfs_private *np = (nfs_private *) fs->fs_private; int fstimeo = -1; @@ -500,7 +504,7 @@ nfs_keepalive(fserver *fs) dlog("NFS timeout in %d seconds", fstimeo); #endif /* DEBUG */ - fs->fs_cid = timeout(fstimeo, nfs_timed_out, (void *)fs); + fs->fs_cid = timeout(fstimeo, nfs_timed_out, fs); } int @@ -674,8 +678,8 @@ find_nfs_srvr(mntfs *mf) * MAX_ALLOWED_PINGS of the fast variety have failed. */ np->np_ttl = clocktime() + MAX_ALLOWED_PINGS * FAST_NFS_PING - 1; - fs->fs_private = (void *)np; - fs->fs_prfree = (void (*)()) free; + fs->fs_private = np; + fs->fs_prfree = free; if (!(fs->fs_flags & FSF_ERROR)) { /* diff --git a/usr.sbin/amd/include/am.h b/usr.sbin/amd/include/am.h index 269fa65bd6a..46d5bedb584 100644 --- a/usr.sbin/amd/include/am.h +++ b/usr.sbin/amd/include/am.h @@ -1,4 +1,4 @@ -/* $OpenBSD: am.h,v 1.15 2014/10/26 02:50:44 guenther Exp $ */ +/* $OpenBSD: am.h,v 1.16 2014/10/26 03:03:34 guenther Exp $ */ /* * Copyright (c) 1990 Jan-Simon Pendry @@ -209,6 +209,7 @@ struct fhstatus; */ extern void am_mounted(am_node *); extern void am_unmounted(am_node *); +extern void amq_program_1(struct svc_req *, SVCXPRT *); extern pid_t background(void); extern int bind_resv_port(int, unsigned short *); extern int compute_mount_flags(struct mntent *); @@ -232,7 +233,7 @@ extern void flush_mntfs(void); extern void flush_nfs_fhandle_cache(fserver *); extern void flush_srvr_nfs_cache(void); extern void forcibly_timeout_mp(am_node *); -extern void free_mntfs(mntfs *); +extern void free_mntfs(void *); extern void free_opts(am_opts *); extern void free_map(am_node *); extern void free_mntlist(mntlist *); @@ -258,7 +259,7 @@ extern int make_rpc_packet(char *, int, u_long, struct rpc_msg *, extern void map_flush_srvr(fserver *); extern void mapc_add_kv(mnt_map *, char *, char *); extern mnt_map *mapc_find(char *, char *); -extern void mapc_free(mnt_map *); +extern void mapc_free(void *); extern int mapc_keyiter(mnt_map*, void (*)(char *,void *), void *); extern int mapc_search(mnt_map *, char *, char **); extern void mapc_reload(void); @@ -277,6 +278,7 @@ extern mntfs *new_mntfs(void); extern void new_ttl(am_node *); extern am_node *next_map(int *); extern int nfs_srvr_port(fserver *, u_short *, void *); +extern void nfs_program_2(struct svc_req *, SVCXPRT *); extern void normalize_slash(char *); extern void ops_showfstypes(FILE *); extern int pickup_rpc_reply(void *, int, void *, xdrproc_t); @@ -285,7 +287,9 @@ extern mntfs *realloc_mntfs(mntfs *, am_ops *, am_opts *, char *, char *, char *, char *, char *); extern void rem_que(qelem *); extern void reschedule_timeout_mp(void); +extern void reschedule_timeouts(time_t, time_t); extern void restart(void); +extern nfs_fh *root_fh(char *); extern void rmdirs(char *); extern am_node *root_ap(char *, int); extern int root_keyiter(void (*)(char *,void *), void *); @@ -303,7 +307,7 @@ extern char **strsplit(char *, int, int); extern int switch_option(char *); extern int switch_to_logfile(char *); extern void do_task_notify(void); -extern int timeout(unsigned int, void (*fn)(), void *); +extern int timeout(unsigned int, void (*fn)(void *), void *); extern void umount_exported(void); extern int umount_fs(char *); /*extern int unmount_node(am_node*); @@ -458,7 +462,7 @@ struct fserver { int fs_flags; /* Flags */ char *fs_type; /* File server type */ void *fs_private; /* Private data */ - void (*fs_prfree)(); /* Free private data */ + void (*fs_prfree)(void *); /* Free private data */ }; #define FSF_VALID 0x0001 /* Valid information available */ #define FSF_DOWN 0x0002 /* This fileserver is thought to be down */ @@ -485,7 +489,7 @@ struct mntfs { int mf_error; /* Error code from background mount */ int mf_refc; /* Number of references to this node */ int mf_cid; /* Callout id */ - void (*mf_prfree)(); /* Free private space */ + void (*mf_prfree)(void *); /* Free private space */ void *mf_private; /* Private - per-fs data */ }; diff --git a/usr.sbin/amd/rpcx/amq.h b/usr.sbin/amd/rpcx/amq.h index c0bce297a22..820db4cb246 100644 --- a/usr.sbin/amd/rpcx/amq.h +++ b/usr.sbin/amd/rpcx/amq.h @@ -32,18 +32,18 @@ * SUCH DAMAGE. * * from: @(#)amq.h 8.1 (Berkeley) 6/6/93 - * $Id: amq.h,v 1.4 2003/06/02 23:36:52 millert Exp $ + * $Id: amq.h,v 1.5 2014/10/26 03:03:34 guenther Exp $ * */ #define AMQ_STRLEN 1024 typedef char *amq_string; -bool_t xdr_amq_string(); +bool_t xdr_amq_string(XDR *, amq_string *); typedef int *time_type; -bool_t xdr_time_type(); +bool_t xdr_time_type(XDR *, time_type *); struct amq_mount_tree { @@ -62,11 +62,11 @@ struct amq_mount_tree { struct amq_mount_tree *mt_child; }; typedef struct amq_mount_tree amq_mount_tree; -bool_t xdr_amq_mount_tree(); +bool_t xdr_amq_mount_tree(XDR *, amq_mount_tree *); typedef amq_mount_tree *amq_mount_tree_p; -bool_t xdr_amq_mount_tree_p(); +bool_t xdr_amq_mount_tree_p(XDR *, amq_mount_tree_p *); struct amq_mount_info { @@ -79,21 +79,21 @@ struct amq_mount_info { int mi_up; }; typedef struct amq_mount_info amq_mount_info; -bool_t xdr_amq_mount_info(); +bool_t xdr_amq_mount_info(XDR *, amq_mount_info *); typedef struct { u_int amq_mount_info_list_len; amq_mount_info *amq_mount_info_list_val; } amq_mount_info_list; -bool_t xdr_amq_mount_info_list(); +bool_t xdr_amq_mount_info_list(XDR *, amq_mount_info_list *); typedef struct { u_int amq_mount_tree_list_len; amq_mount_tree_p *amq_mount_tree_list_val; } amq_mount_tree_list; -bool_t xdr_amq_mount_tree_list(); +bool_t xdr_amq_mount_tree_list(XDR *, amq_mount_tree_list *); struct amq_mount_stats { @@ -104,7 +104,7 @@ struct amq_mount_stats { int as_uerr; }; typedef struct amq_mount_stats amq_mount_stats; -bool_t xdr_amq_mount_stats(); +bool_t xdr_amq_mount_stats(XDR *, amq_mount_stats *); enum amq_opt { @@ -114,7 +114,7 @@ enum amq_opt { AMOPT_FLUSHMAPC = 3 }; typedef enum amq_opt amq_opt; -bool_t xdr_amq_opt(); +bool_t xdr_amq_opt(XDR *, amq_opt *); struct amq_setopt { @@ -122,27 +122,36 @@ struct amq_setopt { amq_string as_str; }; typedef struct amq_setopt amq_setopt; -bool_t xdr_amq_setopt(); +bool_t xdr_amq_setopt(XDR *, amq_setopt *); #define AMQ_PROGRAM ((u_long)300019) #define AMQ_VERSION ((u_long)1) #define AMQPROC_NULL ((u_long)0) -extern void *amqproc_null_1(); +extern void *amqproc_null_1(void *, CLIENT *); +extern void *amqproc_null_1_svc(void *, struct svc_req *); #define AMQPROC_MNTTREE ((u_long)1) -extern amq_mount_tree_p *amqproc_mnttree_1(); +extern amq_mount_tree_p *amqproc_mnttree_1(void *, CLIENT *); +extern amq_mount_tree_p *amqproc_mnttree_1_svc(void *, struct svc_req *); #define AMQPROC_UMNT ((u_long)2) -extern void *amqproc_umnt_1(); +extern void *amqproc_umnt_1(void *, CLIENT *); +extern void *amqproc_umnt_1_svc(void *, struct svc_req *); #define AMQPROC_STATS ((u_long)3) -extern amq_mount_stats *amqproc_stats_1(); +extern amq_mount_stats *amqproc_stats_1(void *, CLIENT *); +extern amq_mount_stats *amqproc_stats_1_svc(void *, struct svc_req *); #define AMQPROC_EXPORT ((u_long)4) -extern amq_mount_tree_list *amqproc_export_1(); +extern amq_mount_tree_list *amqproc_export_1(void *, CLIENT *); +extern amq_mount_tree_list *amqproc_export_1_svc(void *, struct svc_req *); #define AMQPROC_SETOPT ((u_long)5) -extern int *amqproc_setopt_1(); +extern int *amqproc_setopt_1(void *, CLIENT *); +extern int *amqproc_setopt_1_svc(void *, struct svc_req *); #define AMQPROC_GETMNTFS ((u_long)6) -extern amq_mount_info_list *amqproc_getmntfs_1(); +extern amq_mount_info_list *amqproc_getmntfs_1(void *, CLIENT *); +extern amq_mount_info_list *amqproc_getmntfs_1_svc(void *, struct svc_req *); #define AMQPROC_MOUNT ((u_long)7) -extern int *amqproc_mount_1(); +extern int *amqproc_mount_1(void *, CLIENT *); +extern int *amqproc_mount_1_svc(void *, struct svc_req *); #define AMQPROC_GETVERS ((u_long)8) -extern amq_string *amqproc_getvers_1(); +extern amq_string *amqproc_getvers_1(void *, CLIENT *); +extern amq_string *amqproc_getvers_1_svc(void *, struct svc_req *); diff --git a/usr.sbin/amd/rpcx/amq_clnt.c b/usr.sbin/amd/rpcx/amq_clnt.c index 5e931b21729..c54daa7ea75 100644 --- a/usr.sbin/amd/rpcx/amq_clnt.c +++ b/usr.sbin/amd/rpcx/amq_clnt.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)amq_clnt.c 8.1 (Berkeley) 6/6/93 - * $Id: amq_clnt.c,v 1.5 2003/06/02 23:36:52 millert Exp $ + * $Id: amq_clnt.c,v 1.6 2014/10/26 03:03:34 guenther Exp $ * */ @@ -56,7 +56,7 @@ amqproc_null_1(void *argp, CLIENT *clnt) amq_mount_tree_p * -amqproc_mnttree_1(amq_string *argp, CLIENT *clnt) +amqproc_mnttree_1(void *argp, CLIENT *clnt) { static amq_mount_tree_p res; @@ -70,7 +70,7 @@ amqproc_mnttree_1(amq_string *argp, CLIENT *clnt) void * -amqproc_umnt_1(amq_string *argp, CLIENT *clnt) +amqproc_umnt_1(void *argp, CLIENT *clnt) { static char res; @@ -111,7 +111,7 @@ amqproc_export_1(void *argp, CLIENT *clnt) } int * -amqproc_setopt_1(amq_setopt *argp, CLIENT *clnt) +amqproc_setopt_1(void *argp, CLIENT *clnt) { static int res; diff --git a/usr.sbin/amd/rpcx/amq_svc.c b/usr.sbin/amd/rpcx/amq_svc.c index 7b83c43fff6..d9d3a98b61c 100644 --- a/usr.sbin/amd/rpcx/amq_svc.c +++ b/usr.sbin/amd/rpcx/amq_svc.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)amq_svc.c 8.1 (Berkeley) 6/6/93 - * $Id: amq_svc.c,v 1.7 2003/07/18 22:58:56 david Exp $ + * $Id: amq_svc.c,v 1.8 2014/10/26 03:03:34 guenther Exp $ * */ @@ -74,55 +74,55 @@ amq_program_1(struct svc_req *rqstp, SVCXPRT *transp) case AMQPROC_NULL: xdr_argument = xdr_void; xdr_result = xdr_void; - local = (char *(*)()) amqproc_null_1; + local = (char *(*)()) amqproc_null_1_svc; break; case AMQPROC_MNTTREE: xdr_argument = xdr_amq_string; xdr_result = xdr_amq_mount_tree_p; - local = (char *(*)()) amqproc_mnttree_1; + local = (char *(*)()) amqproc_mnttree_1_svc; break; case AMQPROC_UMNT: xdr_argument = xdr_amq_string; xdr_result = xdr_void; - local = (char *(*)()) amqproc_umnt_1; + local = (char *(*)()) amqproc_umnt_1_svc; break; case AMQPROC_STATS: xdr_argument = xdr_void; xdr_result = xdr_amq_mount_stats; - local = (char *(*)()) amqproc_stats_1; + local = (char *(*)()) amqproc_stats_1_svc; break; case AMQPROC_EXPORT: xdr_argument = xdr_void; xdr_result = xdr_amq_mount_tree_list; - local = (char *(*)()) amqproc_export_1; + local = (char *(*)()) amqproc_export_1_svc; break; case AMQPROC_SETOPT: xdr_argument = xdr_amq_setopt; xdr_result = xdr_int; - local = (char *(*)()) amqproc_setopt_1; + local = (char *(*)()) amqproc_setopt_1_svc; break; case AMQPROC_GETMNTFS: xdr_argument = xdr_void; xdr_result = xdr_amq_mount_info_qelem; - local = (char *(*)()) amqproc_getmntfs_1; + local = (char *(*)()) amqproc_getmntfs_1_svc; break; case AMQPROC_MOUNT: xdr_argument = xdr_amq_string; xdr_result = xdr_int; - local = (char *(*)()) amqproc_mount_1; + local = (char *(*)()) amqproc_mount_1_svc; break; case AMQPROC_GETVERS: xdr_argument = xdr_void; xdr_result = xdr_amq_string; - local = (char *(*)()) amqproc_getvers_1; + local = (char *(*)()) amqproc_getvers_1_svc; break; default: diff --git a/usr.sbin/amd/rpcx/mount.h b/usr.sbin/amd/rpcx/mount.h index 1a883c81364..ddd3ddd215b 100644 --- a/usr.sbin/amd/rpcx/mount.h +++ b/usr.sbin/amd/rpcx/mount.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mount.h,v 1.7 2014/10/20 02:33:42 guenther Exp $ */ +/* $OpenBSD: mount.h,v 1.8 2014/10/26 03:03:34 guenther Exp $ */ /* * Copyright (c) 1990 Jan-Simon Pendry @@ -49,22 +49,22 @@ typedef struct fhstatus { fhandle fhs_fhandle; } fhstatus; -bool_t xdr_fhandle(); +bool_t xdr_fhandle(XDR *, fhandle *); -bool_t xdr_fhstatus(); +bool_t xdr_fhstatus(XDR *, fhstatus *); typedef char *dirpath; -bool_t xdr_dirpath(); +bool_t xdr_dirpath(XDR *, dirpath *); typedef char *name; -bool_t xdr_name(); +bool_t xdr_name(XDR *, name *); typedef struct mountbody *mountlist; -bool_t xdr_mountlist(); +bool_t xdr_mountlist(XDR *, mountlist *); struct mountbody { @@ -73,11 +73,11 @@ struct mountbody { mountlist ml_next; }; typedef struct mountbody mountbody; -bool_t xdr_mountbody(); +bool_t xdr_mountbody(XDR *, mountbody *); typedef struct groupnode *groups; -bool_t xdr_groups(); +bool_t xdr_groups(XDR *, groups *); struct groupnode { @@ -85,11 +85,11 @@ struct groupnode { groups gr_next; }; typedef struct groupnode groupnode; -bool_t xdr_groupnode(); +bool_t xdr_groupnode(XDR *, groupnode *); typedef struct exportnode *exports; -bool_t xdr_exports(); +bool_t xdr_exports(XDR *, exports *); struct exportnode { @@ -98,22 +98,22 @@ struct exportnode { exports ex_next; }; typedef struct exportnode exportnode; -bool_t xdr_exportnode(); +bool_t xdr_exportnode(XDR *, exportnode *); #define MOUNTPROG ((u_long)100005) #define MOUNTVERS ((u_long)1) #define MOUNTPROC_NULL ((u_long)0) -extern void *mountproc_null_1(); +extern void *mountproc_null_1(void *, CLIENT *); #define MOUNTPROC_MNT ((u_long)1) -extern fhstatus *mountproc_mnt_1(); +extern fhstatus *mountproc_mnt_1(void *, CLIENT *); #define MOUNTPROC_DUMP ((u_long)2) -extern mountlist *mountproc_dump_1(); +extern mountlist *mountproc_dump_1(void *, CLIENT *); #define MOUNTPROC_UMNT ((u_long)3) -extern void *mountproc_umnt_1(); +extern void *mountproc_umnt_1(void *, CLIENT *); #define MOUNTPROC_UMNTALL ((u_long)4) -extern void *mountproc_umntall_1(); +extern void *mountproc_umntall_1(void *, CLIENT *); #define MOUNTPROC_EXPORT ((u_long)5) -extern exports *mountproc_export_1(); +extern exports *mountproc_export_1(void *, CLIENT *); #define MOUNTPROC_EXPORTALL ((u_long)6) -extern exports *mountproc_exportall_1(); +extern exports *mountproc_exportall_1(void *, CLIENT *); diff --git a/usr.sbin/amd/rpcx/nfs_prot.h b/usr.sbin/amd/rpcx/nfs_prot.h index 377706828c7..3ed3917bf8b 100644 --- a/usr.sbin/amd/rpcx/nfs_prot.h +++ b/usr.sbin/amd/rpcx/nfs_prot.h @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_prot.h,v 1.5 2014/10/20 02:33:42 guenther Exp $ */ +/* $OpenBSD: nfs_prot.h,v 1.6 2014/10/26 03:03:34 guenther Exp $ */ /* * Copyright (c) 1990 Jan-Simon Pendry @@ -61,19 +61,19 @@ typedef int nfsstat; -bool_t xdr_nfsstat(); +bool_t xdr_nfsstat(XDR *, nfsstat *); typedef int ftype; -/* static bool_t xdr_ftype(); */ +/* static bool_t xdr_ftype(XDR *, ftype *); */ struct nfs_fh { char data[NFS_FHSIZE]; }; typedef struct nfs_fh nfs_fh; -bool_t xdr_nfs_fh(); +bool_t xdr_nfs_fh(XDR *, nfs_fh *); struct nfstime { @@ -81,7 +81,7 @@ struct nfstime { u_int useconds; }; typedef struct nfstime nfstime; -/* static bool_t xdr_nfstime(); */ +/* static bool_t xdr_nfstime(XDR *, nfstime *); */ struct fattr { @@ -101,7 +101,7 @@ struct fattr { nfstime ctime; }; typedef struct fattr fattr; -/* static bool_t xdr_fattr(); */ +/* static bool_t xdr_fattr(XDR *, fattr *); */ struct sattr { @@ -113,15 +113,15 @@ struct sattr { nfstime mtime; }; typedef struct sattr sattr; -/* static bool_t xdr_sattr(); */ +/* static bool_t xdr_sattr(XDR *, sattr *); */ typedef char *filename; -/* static bool_t xdr_filename(); */ +/* static bool_t xdr_filename(XDR *, filename *); */ typedef char *nfspath; -bool_t xdr_nfspath(); +bool_t xdr_nfspath(XDR *, nfspath *); struct attrstat { @@ -131,7 +131,7 @@ struct attrstat { } attrstat_u; }; typedef struct attrstat attrstat; -bool_t xdr_attrstat(); +bool_t xdr_attrstat(XDR *, attrstat *); struct sattrargs { @@ -139,7 +139,7 @@ struct sattrargs { sattr attributes; }; typedef struct sattrargs sattrargs; -bool_t xdr_sattrargs(); +bool_t xdr_sattrargs(XDR *, sattrargs *); struct diropargs { @@ -147,7 +147,7 @@ struct diropargs { filename name; }; typedef struct diropargs diropargs; -bool_t xdr_diropargs(); +bool_t xdr_diropargs(XDR *, diropargs *); struct diropokres { @@ -155,7 +155,7 @@ struct diropokres { fattr attributes; }; typedef struct diropokres diropokres; -bool_t xdr_diropokres(); +bool_t xdr_diropokres(XDR *, diropokres *); struct diropres { @@ -165,7 +165,7 @@ struct diropres { } diropres_u; }; typedef struct diropres diropres; -bool_t xdr_diropres(); +bool_t xdr_diropres(XDR *, diropres *); struct readlinkres { @@ -175,7 +175,7 @@ struct readlinkres { } readlinkres_u; }; typedef struct readlinkres readlinkres; -bool_t xdr_readlinkres(); +bool_t xdr_readlinkres(XDR *, readlinkres *); struct readargs { @@ -185,7 +185,7 @@ struct readargs { u_int totalcount; }; typedef struct readargs readargs; -bool_t xdr_readargs(); +bool_t xdr_readargs(XDR *, readargs *); struct readokres { @@ -196,7 +196,7 @@ struct readokres { } data; }; typedef struct readokres readokres; -bool_t xdr_readokres(); +bool_t xdr_readokres(XDR *, readokres *); struct readres { @@ -206,7 +206,7 @@ struct readres { } readres_u; }; typedef struct readres readres; -bool_t xdr_readres(); +bool_t xdr_readres(XDR *, readres *); struct writeargs { @@ -220,7 +220,7 @@ struct writeargs { } data; }; typedef struct writeargs writeargs; -bool_t xdr_writeargs(); +bool_t xdr_writeargs(XDR *, writeargs *); struct createargs { @@ -228,7 +228,7 @@ struct createargs { sattr attributes; }; typedef struct createargs createargs; -bool_t xdr_createargs(); +bool_t xdr_createargs(XDR *, createargs *); struct renameargs { @@ -236,7 +236,7 @@ struct renameargs { diropargs to; }; typedef struct renameargs renameargs; -bool_t xdr_renameargs(); +bool_t xdr_renameargs(XDR *, renameargs *); struct linkargs { @@ -244,7 +244,7 @@ struct linkargs { diropargs to; }; typedef struct linkargs linkargs; -bool_t xdr_linkargs(); +bool_t xdr_linkargs(XDR *, linkargs *); struct symlinkargs { @@ -253,11 +253,11 @@ struct symlinkargs { sattr attributes; }; typedef struct symlinkargs symlinkargs; -bool_t xdr_symlinkargs(); +bool_t xdr_symlinkargs(XDR *, symlinkargs *); typedef char nfscookie[NFS_COOKIESIZE]; -/* static bool_t xdr_nfscookie(); */ +/* static bool_t xdr_nfscookie(XDR *, nfscookie *); */ struct readdirargs { @@ -266,7 +266,7 @@ struct readdirargs { u_int count; }; typedef struct readdirargs readdirargs; -bool_t xdr_readdirargs(); +bool_t xdr_readdirargs(XDR *, readdirargs *); struct entry { @@ -276,7 +276,7 @@ struct entry { struct entry *nextentry; }; typedef struct entry entry; -/* static bool_t xdr_entry(); */ +/* static bool_t xdr_entry(XDR *, entry *); */ struct dirlist { @@ -284,7 +284,7 @@ struct dirlist { bool_t eof; }; typedef struct dirlist dirlist; -/* static bool_t xdr_dirlist(); */ +/* static bool_t xdr_dirlist(XDR *, dirlist *); */ struct readdirres { @@ -294,7 +294,7 @@ struct readdirres { } readdirres_u; }; typedef struct readdirres readdirres; -bool_t xdr_readdirres(); +bool_t xdr_readdirres(XDR *, readdirres *); struct statfsokres { @@ -305,7 +305,7 @@ struct statfsokres { u_int bavail; }; typedef struct statfsokres statfsokres; -bool_t xdr_statfsokres(); +bool_t xdr_statfsokres(XDR *, statfsokres *); struct statfsres { @@ -315,7 +315,7 @@ struct statfsres { } statfsres_u; }; typedef struct statfsres statfsres; -bool_t xdr_statfsres(); +bool_t xdr_statfsres(XDR *, statfsres *); #define NFS_PROGRAM ((u_long)100003) @@ -359,21 +359,21 @@ bool_t xdr_statfsres(); #undef NFSPROC_STATFS #define NFSPROC_STATFS ((u_long)17) -extern void *nfsproc_null_2(); -extern attrstat *nfsproc_getattr_2(); -extern attrstat *nfsproc_setattr_2(); -extern void *nfsproc_root_2(); -extern diropres *nfsproc_lookup_2(); -extern readlinkres *nfsproc_readlink_2(); -extern readres *nfsproc_read_2(); -extern void *nfsproc_writecache_2(); -extern attrstat *nfsproc_write_2(); -extern diropres *nfsproc_create_2(); -extern nfsstat *nfsproc_remove_2(); -extern nfsstat *nfsproc_rename_2(); -extern nfsstat *nfsproc_link_2(); -extern nfsstat *nfsproc_symlink_2(); -extern diropres *nfsproc_mkdir_2(); -extern nfsstat *nfsproc_rmdir_2(); -extern readdirres *nfsproc_readdir_2(); -extern statfsres *nfsproc_statfs_2(); +extern void *nfsproc_null_2(void *, struct svc_req *); +extern attrstat *nfsproc_getattr_2(nfs_fh *, struct svc_req *); +extern attrstat *nfsproc_setattr_2(sattrargs *, struct svc_req *); +extern void *nfsproc_root_2(void *, struct svc_req *); +extern diropres *nfsproc_lookup_2(diropargs *, struct svc_req *); +extern readlinkres *nfsproc_readlink_2(nfs_fh *, struct svc_req *); +extern readres *nfsproc_read_2(readargs *, struct svc_req *); +extern void *nfsproc_writecache_2(void *, struct svc_req *); +extern attrstat *nfsproc_write_2(writeargs *, struct svc_req *); +extern diropres *nfsproc_create_2(createargs *, struct svc_req *); +extern nfsstat *nfsproc_remove_2(diropargs *, struct svc_req *); +extern nfsstat *nfsproc_rename_2(renameargs *, struct svc_req *); +extern nfsstat *nfsproc_link_2(linkargs *, struct svc_req *); +extern nfsstat *nfsproc_symlink_2(symlinkargs *, struct svc_req *); +extern diropres *nfsproc_mkdir_2(createargs *, struct svc_req *); +extern nfsstat *nfsproc_rmdir_2(diropargs *, struct svc_req *); +extern readdirres *nfsproc_readdir_2(readdirargs *, struct svc_req *); +extern statfsres *nfsproc_statfs_2(nfs_fh *, struct svc_req *); diff --git a/usr.sbin/amd/rpcx/nfs_prot_svc.c b/usr.sbin/amd/rpcx/nfs_prot_svc.c index 463c2e9f91a..4e80ce37f78 100644 --- a/usr.sbin/amd/rpcx/nfs_prot_svc.c +++ b/usr.sbin/amd/rpcx/nfs_prot_svc.c @@ -32,15 +32,14 @@ * SUCH DAMAGE. * * from: @(#)nfs_prot_svc.c 8.1 (Berkeley) 6/6/93 - * $Id: nfs_prot_svc.c,v 1.3 2003/06/02 23:36:52 millert Exp $ + * $Id: nfs_prot_svc.c,v 1.4 2014/10/26 03:03:34 guenther Exp $ * */ #include "am.h" -void nfs_program_2(rqstp, transp) -struct svc_req *rqstp; -SVCXPRT *transp; +void +nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp) { union { nfs_fh nfsproc_getattr_2_arg; @@ -61,115 +60,115 @@ SVCXPRT *transp; } argument; char *result; bool_t (*xdr_argument)(), (*xdr_result)(); - char *(*local)(); + char *(*local)(void *, struct svc_req *); switch (rqstp->rq_proc) { case NFSPROC_NULL: xdr_argument = xdr_void; xdr_result = xdr_void; - local = (char *(*)()) nfsproc_null_2; + local = (char *(*)(void *, struct svc_req *)) nfsproc_null_2; break; case NFSPROC_GETATTR: xdr_argument = xdr_nfs_fh; xdr_result = xdr_attrstat; - local = (char *(*)()) nfsproc_getattr_2; + local = (char *(*)(void *, struct svc_req *)) nfsproc_getattr_2; break; case NFSPROC_SETATTR: xdr_argument = xdr_sattrargs; xdr_result = xdr_attrstat; - local = (char *(*)()) nfsproc_setattr_2; + local = (char *(*)(void *, struct svc_req *)) nfsproc_setattr_2; break; case NFSPROC_ROOT: xdr_argument = xdr_void; xdr_result = xdr_void; - local = (char *(*)()) nfsproc_root_2; + local = (char *(*)(void *, struct svc_req *)) nfsproc_root_2; break; case NFSPROC_LOOKUP: xdr_argument = xdr_diropargs; xdr_result = xdr_diropres; - local = (char *(*)()) nfsproc_lookup_2; + local = (char *(*)(void *, struct svc_req *)) nfsproc_lookup_2; break; case NFSPROC_READLINK: xdr_argument = xdr_nfs_fh; xdr_result = xdr_readlinkres; - local = (char *(*)()) nfsproc_readlink_2; + local = (char *(*)(void *, struct svc_req *)) nfsproc_readlink_2; break; case NFSPROC_READ: xdr_argument = xdr_readargs; xdr_result = xdr_readres; - local = (char *(*)()) nfsproc_read_2; + local = (char *(*)(void *, struct svc_req *)) nfsproc_read_2; break; case NFSPROC_WRITECACHE: xdr_argument = xdr_void; xdr_result = xdr_void; - local = (char *(*)()) nfsproc_writecache_2; + local = (char *(*)(void *, struct svc_req *)) nfsproc_writecache_2; break; case NFSPROC_WRITE: xdr_argument = xdr_writeargs; xdr_result = xdr_attrstat; - local = (char *(*)()) nfsproc_write_2; + local = (char *(*)(void *, struct svc_req *)) nfsproc_write_2; break; case NFSPROC_CREATE: xdr_argument = xdr_createargs; xdr_result = xdr_diropres; - local = (char *(*)()) nfsproc_create_2; + local = (char *(*)(void *, struct svc_req *)) nfsproc_create_2; break; case NFSPROC_REMOVE: xdr_argument = xdr_diropargs; xdr_result = xdr_nfsstat; - local = (char *(*)()) nfsproc_remove_2; + local = (char *(*)(void *, struct svc_req *)) nfsproc_remove_2; break; case NFSPROC_RENAME: xdr_argument = xdr_renameargs; xdr_result = xdr_nfsstat; - local = (char *(*)()) nfsproc_rename_2; + local = (char *(*)(void *, struct svc_req *)) nfsproc_rename_2; break; case NFSPROC_LINK: xdr_argument = xdr_linkargs; xdr_result = xdr_nfsstat; - local = (char *(*)()) nfsproc_link_2; + local = (char *(*)(void *, struct svc_req *)) nfsproc_link_2; break; case NFSPROC_SYMLINK: xdr_argument = xdr_symlinkargs; xdr_result = xdr_nfsstat; - local = (char *(*)()) nfsproc_symlink_2; + local = (char *(*)(void *, struct svc_req *)) nfsproc_symlink_2; break; case NFSPROC_MKDIR: xdr_argument = xdr_createargs; xdr_result = xdr_diropres; - local = (char *(*)()) nfsproc_mkdir_2; + local = (char *(*)(void *, struct svc_req *)) nfsproc_mkdir_2; break; case NFSPROC_RMDIR: xdr_argument = xdr_diropargs; xdr_result = xdr_nfsstat; - local = (char *(*)()) nfsproc_rmdir_2; + local = (char *(*)(void *, struct svc_req *)) nfsproc_rmdir_2; break; case NFSPROC_READDIR: xdr_argument = xdr_readdirargs; xdr_result = xdr_readdirres; - local = (char *(*)()) nfsproc_readdir_2; + local = (char *(*)(void *, struct svc_req *)) nfsproc_readdir_2; break; case NFSPROC_STATFS: xdr_argument = xdr_nfs_fh; xdr_result = xdr_statfsres; - local = (char *(*)()) nfsproc_statfs_2; + local = (char *(*)(void *, struct svc_req *)) nfsproc_statfs_2; break; default: |