summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorPeter Valchev <pvalchev@cvs.openbsd.org>2002-08-05 07:24:27 +0000
committerPeter Valchev <pvalchev@cvs.openbsd.org>2002-08-05 07:24:27 +0000
commitae980d3105e2c0aeae812a8fa319124c4d0e1e0d (patch)
treeb5adbec587b6ad4e48f8e311fbb9d9f1d091aebb /usr.sbin
parent6bcada130c3d1e61ca223494309ab95dae23b19a (diff)
Get rid of useless local definitions P_void, voidp, Const and use
void, void *, const respectively; some cosmetics; ok deraadt
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/amd/amd/ChangeLog2
-rw-r--r--usr.sbin/amd/amd/afs_ops.c54
-rw-r--r--usr.sbin/amd/amd/am_ops.c4
-rw-r--r--usr.sbin/amd/amd/amd.c4
-rw-r--r--usr.sbin/amd/amd/amq_subr.c32
-rw-r--r--usr.sbin/amd/amd/clock.c14
-rw-r--r--usr.sbin/amd/amd/host_ops.c4
-rw-r--r--usr.sbin/amd/amd/info_file.c4
-rw-r--r--usr.sbin/amd/amd/info_nis.c8
-rw-r--r--usr.sbin/amd/amd/map.c28
-rw-r--r--usr.sbin/amd/amd/mapc.c26
-rw-r--r--usr.sbin/amd/amd/misc_rpc.c16
-rw-r--r--usr.sbin/amd/amd/mntfs.c18
-rw-r--r--usr.sbin/amd/amd/mtab.c6
-rw-r--r--usr.sbin/amd/amd/nfs_ops.c54
-rw-r--r--usr.sbin/amd/amd/nfs_start.c8
-rw-r--r--usr.sbin/amd/amd/nfs_subr.c20
-rw-r--r--usr.sbin/amd/amd/nfsx_ops.c26
-rw-r--r--usr.sbin/amd/amd/opts.c8
-rw-r--r--usr.sbin/amd/amd/pfs_ops.c8
-rw-r--r--usr.sbin/amd/amd/rpc_fwd.c20
-rw-r--r--usr.sbin/amd/amd/sched.c24
-rw-r--r--usr.sbin/amd/amd/srvr_afs.c12
-rw-r--r--usr.sbin/amd/amd/srvr_nfs.c42
-rw-r--r--usr.sbin/amd/amd/ufs_ops.c4
-rw-r--r--usr.sbin/amd/amd/util.c14
-rw-r--r--usr.sbin/amd/amd/xutil.c22
-rw-r--r--usr.sbin/amd/amq/amq.c14
-rw-r--r--usr.sbin/amd/config/mount_aix.c6
-rw-r--r--usr.sbin/amd/config/mtab_file.c4
-rw-r--r--usr.sbin/amd/config/os-bsd44.h7
-rw-r--r--usr.sbin/amd/include/am.h80
-rw-r--r--usr.sbin/amd/include/config.h23
-rw-r--r--usr.sbin/amd/mk-amd-map/mk-amd-map.c8
-rw-r--r--usr.sbin/amd/rpcx/amq.h6
-rw-r--r--usr.sbin/amd/rpcx/amq_clnt.c22
-rw-r--r--usr.sbin/amd/rpcx/mount.h8
-rw-r--r--usr.sbin/amd/rpcx/nfs_prot.h8
38 files changed, 323 insertions, 345 deletions
diff --git a/usr.sbin/amd/amd/ChangeLog b/usr.sbin/amd/amd/ChangeLog
index db16488cebb..c5c86e5ddc9 100644
--- a/usr.sbin/amd/amd/ChangeLog
+++ b/usr.sbin/amd/amd/ChangeLog
@@ -167,7 +167,7 @@ Sun Mar 17 12:05:27 1991 Jan-Simon Pendry (jsp at forest)
* (wire.c) Fixed to work with new 4.4BSD sockaddr's.
- * Changed const to Const everywhere and added new define in config.h.
+ * Changed const to const everywhere and added new define in config.h.
* (mk-amd-map.c) New -p option which just writes the output to
stdout. Useful for making NIS or Hesiod maps.
diff --git a/usr.sbin/amd/amd/afs_ops.c b/usr.sbin/amd/amd/afs_ops.c
index 4637c159fea..5e6419cfb02 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.7 2002/08/03 08:29:31 pvalchev Exp $ */
+/* $OpenBSD: afs_ops.c,v 1.8 2002/08/05 07:24:26 pvalchev Exp $ */
/*
* Copyright (c) 1990 Jan-Simon Pendry
@@ -118,7 +118,7 @@ mount_toplvl(char *dir, char *opts)
MTYPE_TYPE type = MOUNT_TYPE_NFS;
- bzero((voidp) &nfs_args, sizeof(nfs_args)); /* Paranoid */
+ bzero((void *)&nfs_args, sizeof(nfs_args)); /* Paranoid */
mnt.mnt_dir = dir;
mnt.mnt_fsname = pid_fsname;
@@ -151,7 +151,7 @@ mount_toplvl(char *dir, char *opts)
* is not used since that will not work in HP-UX clusters and
* this is no more expensive.
*/
- bzero((voidp) &sin, sizeof(sin));
+ bzero((void *)&sin, sizeof(sin));
sin.sin_family = AF_INET;
sin.sin_addr = myipaddr;
if ((port = hasmntval(&mnt, "port"))) {
@@ -251,7 +251,7 @@ afs_mkcacheref(mntfs *mf)
cache = mf->mf_fo->opt_cache;
else
cache = "none";
- mf->mf_private = (voidp) mapc_find(mf->mf_info, cache);
+ mf->mf_private = (void *)mapc_find(mf->mf_info, cache);
mf->mf_prfree = mapc_free;
}
@@ -264,7 +264,7 @@ root_mount(am_node *mp)
mntfs *mf = mp->am_mnt;
mf->mf_mount = strealloc(mf->mf_mount, pid_fsname);
- mf->mf_private = (voidp) mapc_find(mf->mf_info, "");
+ mf->mf_private = (void *)mapc_find(mf->mf_info, "");
mf->mf_prfree = mapc_free;
return 0;
@@ -397,7 +397,7 @@ toplvl_mounted(mntfs *mf)
* Create a reference to a union'ed entry
*/
static int
-create_union_node(char *dir, voidp arg)
+create_union_node(char *dir, void *arg)
{
if (strcmp(dir, "/defaults") != 0) {
int error = 0;
@@ -438,7 +438,7 @@ union_mounted(mntfs *mf)
* keep the wildcard and /defaults entries...
*/
mapc_free(mf->mf_private);
- mf->mf_private = (voidp) mapc_find(mf->mf_info, "inc");
+ mf->mf_private = (void *)mapc_find(mf->mf_info, "inc");
/* mapc_add_kv(mf->mf_private, strdup("/defaults"),
strdup("type:=link;opts:=nounmount;sublink:=${key}")); */
#endif
@@ -546,13 +546,13 @@ free_continuation(struct continuation *cp)
{
if (cp->callout)
untimeout(cp->callout);
- free((voidp) cp->key);
- free((voidp) cp->xivec);
- free((voidp) cp->info);
- free((voidp) cp->auto_opts);
- free((voidp) cp->def_opts);
+ free((void *)cp->key);
+ free((void *)cp->xivec);
+ free((void *)cp->info);
+ free((void *)cp->auto_opts);
+ free((void *)cp->def_opts);
free_opts(&cp->fs_opts);
- free((voidp) cp);
+ free((void *)cp);
}
static int afs_bgmount(struct continuation *, int);
@@ -597,7 +597,7 @@ assign_error_mntfs(am_node *mp)
* completes.
*/
static void
-afs_cont(int rc, int term, voidp closure)
+afs_cont(int rc, int term, void *closure)
{
struct continuation *cp = (struct continuation *) closure;
mntfs *mf = cp->mp->am_mnt;
@@ -614,7 +614,7 @@ afs_cont(int rc, int term, voidp closure)
/*
* Wakeup anything waiting for this mount
*/
- wakeup((voidp) mf);
+ wakeup((void *)mf);
/*
* Check for termination signal or exit status...
@@ -665,7 +665,7 @@ afs_cont(int rc, int term, voidp closure)
*/
/*ARGSUSED*/
static void
-afs_retry(int rc, int term, voidp closure)
+afs_retry(int rc, int term, void *closure)
{
struct continuation *cp = (struct continuation *) closure;
int error = 0;
@@ -702,7 +702,7 @@ afs_retry(int rc, int term, voidp closure)
* directly or in a sub-process by run_task
*/
static int
-try_mount(voidp mvp)
+try_mount(void *mvp)
{
/*
* Mount it!
@@ -1018,7 +1018,7 @@ afs_bgmount(struct continuation *cp, int mpe)
untimeout(cp->callout);
cp->callout = 0;
}
- run_task(try_mount, (voidp) mp, afs_cont, (voidp) cp);
+ run_task(try_mount, (void *)mp, afs_cont, (void *)cp);
mf->mf_flags |= MFF_MKMNT; /* XXX */
if (mf_retry) free_mntfs(mf_retry);
return -1;
@@ -1026,7 +1026,7 @@ afs_bgmount(struct continuation *cp, int mpe)
#ifdef DEBUG
dlog("foreground mount of \"%s\" ...", mf->mf_info);
#endif /* DEBUG */
- this_error = try_mount((voidp) mp);
+ this_error = try_mount((void *)mp);
if (this_error < 0) {
if (!mf_retry)
mf_retry = dup_mntfs(mf);
@@ -1046,7 +1046,7 @@ afs_bgmount(struct continuation *cp, int mpe)
/*
* Wakeup anything waiting for this mount
*/
- wakeup((voidp) mf);
+ wakeup((void *)mf);
}
}
@@ -1072,10 +1072,10 @@ afs_bgmount(struct continuation *cp, int mpe)
#ifdef DEBUG
dlog("Arranging to retry mount of %s", cp->mp->am_path);
#endif /* DEBUG */
- sched_task(afs_retry, (voidp) cp, (voidp) mf);
+ sched_task(afs_retry, (void *)cp, (void *)mf);
if (cp->callout)
untimeout(cp->callout);
- cp->callout = timeout(RETRY_INTERVAL, wakeup, (voidp) mf);
+ cp->callout = timeout(RETRY_INTERVAL, wakeup, (void *)mf);
cp->mp->am_ttl = clocktime() + RETRY_INTERVAL;
@@ -1390,9 +1390,9 @@ in_progrss:
*/
new_mp = exported_ap_alloc();
if (new_mp == 0) {
- free((voidp) xivec);
- free((voidp) info);
- free((voidp) fname);
+ free((void *)xivec);
+ free((void *)info);
+ free((void *)fname);
ereturn(ENOSPC);
}
@@ -1459,7 +1459,7 @@ in_progrss:
/*
* Don't need info vector any more
*/
- free((voidp) rvec);
+ free((void *)rvec);
}
/*
@@ -1506,7 +1506,7 @@ in_progrss:
cp->tried = FALSE;
cp->start = clocktime();
cp->def_opts = strdup(auto_opts);
- bzero((voidp) &cp->fs_opts, sizeof(cp->fs_opts));
+ bzero((void *)&cp->fs_opts, sizeof(cp->fs_opts));
/*
* Try and mount the file system
diff --git a/usr.sbin/amd/amd/am_ops.c b/usr.sbin/amd/amd/am_ops.c
index 8d79aa97a62..53ea0baeadc 100644
--- a/usr.sbin/amd/amd/am_ops.c
+++ b/usr.sbin/amd/amd/am_ops.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)am_ops.c 8.1 (Berkeley) 6/6/93
- * $Id: am_ops.c,v 1.4 2002/08/03 08:29:31 pvalchev Exp $
+ * $Id: am_ops.c,v 1.5 2002/08/05 07:24:26 pvalchev Exp $
*/
#include "am.h"
@@ -158,7 +158,7 @@ ops_match(am_opts *fo, char *key, char *g_key, char *path, char *keym,
* Check the filesystem is happy
*/
if (fo->fs_mtab)
- free((voidp) fo->fs_mtab);
+ free((void *)fo->fs_mtab);
if ((fo->fs_mtab = (*rop->fs_match)(fo)))
return rop;
diff --git a/usr.sbin/amd/amd/amd.c b/usr.sbin/amd/amd/amd.c
index 0c89d2087dc..504e1f8bced 100644
--- a/usr.sbin/amd/amd/amd.c
+++ b/usr.sbin/amd/amd/amd.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)amd.c 8.1 (Berkeley) 6/6/93
- * $Id: amd.c,v 1.10 2002/08/03 08:29:31 pvalchev Exp $
+ * $Id: amd.c,v 1.11 2002/08/05 07:24:26 pvalchev Exp $
*/
#ifndef lint
@@ -146,7 +146,7 @@ parent_exit(int sig)
}
static pid_t
-daemon_mode(P_void)
+daemon_mode(void)
{
pid_t bgpid;
diff --git a/usr.sbin/amd/amd/amq_subr.c b/usr.sbin/amd/amd/amq_subr.c
index 0e7453ddd4a..b1bce0a112c 100644
--- a/usr.sbin/amd/amd/amq_subr.c
+++ b/usr.sbin/amd/amd/amq_subr.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)amq_subr.c 8.1 (Berkeley) 6/6/93
- * $Id: amq_subr.c,v 1.8 2002/08/03 08:29:31 pvalchev Exp $
+ * $Id: amq_subr.c,v 1.9 2002/08/05 07:24:26 pvalchev Exp $
*/
/*
@@ -48,12 +48,12 @@
#include <ctype.h>
/*ARGSUSED*/
-voidp
-amqproc_null_1(voidp argp, struct svc_req *rqstp)
+void *
+amqproc_null_1(void *argp, struct svc_req *rqstp)
{
static char res;
- return (voidp) &res;
+ return (void *)&res;
}
/*
@@ -61,7 +61,7 @@ amqproc_null_1(voidp argp, struct svc_req *rqstp)
*/
/*ARGSUSED*/
amq_mount_tree_p *
-amqproc_mnttree_1(voidp argp, struct svc_req *rqstp)
+amqproc_mnttree_1(void *argp, struct svc_req *rqstp)
{
static am_node *mp;
@@ -73,8 +73,8 @@ amqproc_mnttree_1(voidp argp, struct svc_req *rqstp)
* Unmount a single node
*/
/*ARGSUSED*/
-voidp
-amqproc_umnt_1(voidp argp, struct svc_req *rqstp)
+void *
+amqproc_umnt_1(void *argp, struct svc_req *rqstp)
{
static char res;
@@ -82,7 +82,7 @@ amqproc_umnt_1(voidp argp, struct svc_req *rqstp)
if (mp)
forcibly_timeout_mp(mp);
- return (voidp) &res;
+ return (void *)&res;
}
/*
@@ -90,7 +90,7 @@ amqproc_umnt_1(voidp argp, struct svc_req *rqstp)
*/
/*ARGSUSED*/
amq_mount_stats *
-amqproc_stats_1(voidp argp, struct svc_req *rqstp)
+amqproc_stats_1(void *argp, struct svc_req *rqstp)
{
return (amq_mount_stats *) &amd_stats;
}
@@ -100,7 +100,7 @@ amqproc_stats_1(voidp argp, struct svc_req *rqstp)
*/
/*ARGSUSED*/
amq_mount_tree_list *
-amqproc_export_1(voidp argp, struct svc_req *rqstp)
+amqproc_export_1(void *argp, struct svc_req *rqstp)
{
static amq_mount_tree_list aml;
@@ -111,7 +111,7 @@ amqproc_export_1(voidp argp, struct svc_req *rqstp)
}
int *
-amqproc_setopt_1(voidp argp, struct svc_req *rqstp)
+amqproc_setopt_1(void *argp, struct svc_req *rqstp)
{
static int rc;
@@ -155,7 +155,7 @@ amqproc_setopt_1(voidp argp, struct svc_req *rqstp)
}
amq_mount_info_list *
-amqproc_getmntfs_1(voidp argp, struct svc_req *rqstp)
+amqproc_getmntfs_1(void *argp, struct svc_req *rqstp)
{
extern qelem mfhead;
return (amq_mount_info_list *) &mfhead; /* XXX */
@@ -186,7 +186,7 @@ struct svc_req *rqstp;
int *
amqproc_mount_1(argp, rqstp)
-voidp argp;
+void *argp;
struct svc_req *rqstp;
{
static int rc;
@@ -223,7 +223,7 @@ struct svc_req *rqstp;
cp++;
root_newmap(s, cp, (char *) 0);
- rc = mount_auto_node(s, (voidp) root_node);
+ rc = mount_auto_node(s, (void *)root_node);
if (rc < 0)
return 0;
return &rc;
@@ -233,7 +233,7 @@ struct svc_req *rqstp;
* Disable "amq -M" functionality since it is inherently insecure.
*/
int *
-amqproc_mount_1(voidp argp, struct svc_req *rqstp)
+amqproc_mount_1(void *argp, struct svc_req *rqstp)
{
static int rc;
char *s = *(amq_string *) argp;
@@ -246,7 +246,7 @@ amqproc_mount_1(voidp argp, struct svc_req *rqstp)
#endif
amq_string *
-amqproc_getvers_1(voidp argp, struct svc_req *rqstp)
+amqproc_getvers_1(void *argp, struct svc_req *rqstp)
{
static amq_string res;
diff --git a/usr.sbin/amd/amd/clock.c b/usr.sbin/amd/amd/clock.c
index e8c5ee76180..e7d02271f4b 100644
--- a/usr.sbin/amd/amd/clock.c
+++ b/usr.sbin/amd/amd/clock.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 8.1 (Berkeley) 6/6/93
- * $Id: clock.c,v 1.3 2002/08/03 08:29:31 pvalchev Exp $
+ * $Id: clock.c,v 1.4 2002/08/05 07:24:26 pvalchev Exp $
*/
/*
@@ -56,7 +56,7 @@ typedef struct callout callout;
struct callout {
callout *c_next; /* List of callouts */
void (*c_fn)(); /* Function to call */
- voidp c_closure; /* Closure to pass to call */
+ void *c_closure; /* Closure to pass to call */
time_t c_time; /* Time of call */
int c_id; /* Unique identifier */
};
@@ -79,7 +79,7 @@ time_t next_softclock; /* Time of next call to softclock() */
#define CID_UNDEF (0)
static callout *
-alloc_callout(P_void)
+alloc_callout(void)
{
callout *cp = free_callouts;
if (cp) {
@@ -94,7 +94,7 @@ static void
free_callout(callout *cp)
{
if (nfree_callouts > CALLOUT_FREE_SLOP) {
- free((voidp) cp);
+ free((void *)cp);
} else {
cp->c_next = free_callouts;
free_callouts = cp;
@@ -108,7 +108,7 @@ free_callout(callout *cp)
* (*fn)(closure) will be called at clocktime() + secs
*/
int
-timeout(unsigned int secs, void (*fn)(), voidp closure)
+timeout(unsigned int secs, void (*fn)(), void *closure)
{
callout *cp, *cp2;
time_t t = clocktime() + secs;
@@ -184,7 +184,7 @@ reschedule_timeouts(time_t now, time_t then)
* Clock handler
*/
int
-softclock(P_void)
+softclock(void)
{
time_t now;
callout *cp;
@@ -210,7 +210,7 @@ softclock(P_void)
* and try to allocate a callout
*/
void (*fn)() = cp->c_fn;
- voidp closure = cp->c_closure;
+ void *closure = cp->c_closure;
callouts.c_next = cp->c_next;
free_callout(cp);
diff --git a/usr.sbin/amd/amd/host_ops.c b/usr.sbin/amd/amd/host_ops.c
index 5a90df5e804..0ae1437ee31 100644
--- a/usr.sbin/amd/amd/host_ops.c
+++ b/usr.sbin/amd/amd/host_ops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: host_ops.c,v 1.9 2002/08/03 21:49:24 deraadt Exp $ */
+/* $OpenBSD: host_ops.c,v 1.10 2002/08/05 07:24:26 pvalchev Exp $ */
/*
* Copyright (c) 1990 Jan-Simon Pendry
@@ -203,7 +203,7 @@ fetch_fhandle(CLIENT *client, char *dir, fhstatus *fhp)
* Scan mount table to see if something already mounted
*/
static int
-already_mounted(mntlist *mlist, char*dir)
+already_mounted(mntlist *mlist, char *dir)
{
mntlist *ml;
diff --git a/usr.sbin/amd/amd/info_file.c b/usr.sbin/amd/amd/info_file.c
index 1e9b1fffad1..2f0772b65e6 100644
--- a/usr.sbin/amd/amd/info_file.c
+++ b/usr.sbin/amd/amd/info_file.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)info_file.c 8.1 (Berkeley) 6/6/93
- * $Id: info_file.c,v 1.3 2002/07/18 02:14:45 deraadt Exp $
+ * $Id: info_file.c,v 1.4 2002/08/05 07:24:26 pvalchev Exp $
*/
/*
@@ -88,7 +88,7 @@ read_line(char *buf, int size, FILE *fp)
*/
static int
search_or_reload_file(FILE *fp, char *map, char *key, char **val, mnt_map *m,
- void (*fn)(mnt_map *m, char*, char*))
+ void (*fn)(mnt_map *m, char *, char *))
{
char key_val[MAX_LINE_LEN];
int chuck = 0;
diff --git a/usr.sbin/amd/amd/info_nis.c b/usr.sbin/amd/amd/info_nis.c
index 70e62258b08..6c2ea9658b6 100644
--- a/usr.sbin/amd/amd/info_nis.c
+++ b/usr.sbin/amd/amd/info_nis.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)info_nis.c 8.1 (Berkeley) 6/6/93
- * $Id: info_nis.c,v 1.8 2002/08/03 08:29:31 pvalchev Exp $
+ * $Id: info_nis.c,v 1.9 2002/08/05 07:24:26 pvalchev Exp $
*/
/*
@@ -61,7 +61,7 @@ static int has_yp_order = FALSE;
* Figure out the nis domain name
*/
static int
-determine_nis_domain(P_void)
+determine_nis_domain(void)
{
static int nis_not_running = 0;
@@ -153,8 +153,8 @@ nis_reload(mnt_map *m, char *map, void (*fn)())
data.ncd_m = m;
data.ncd_map = map;
data.ncd_fn = fn;
- cbinfo.data = (voidp)&data;
- cbinfo.foreach = (voidp)&callback;
+ cbinfo.data = (void *)&data;
+ cbinfo.foreach = (void *)&callback;
error = yp_all(domain, map, &cbinfo);
diff --git a/usr.sbin/amd/amd/map.c b/usr.sbin/amd/amd/map.c
index 07d13796b09..52a6427f3a0 100644
--- a/usr.sbin/amd/amd/map.c
+++ b/usr.sbin/amd/amd/map.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: map.c,v 1.6 2002/08/03 08:29:31 pvalchev Exp $ */
+/* $OpenBSD: map.c,v 1.7 2002/08/05 07:24:26 pvalchev Exp $ */
/*-
* Copyright (c) 1990 Jan-Simon Pendry
@@ -40,7 +40,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)map.c 8.1 (Berkeley) 6/6/93";*/
-static char *rcsid = "$OpenBSD: map.c,v 1.6 2002/08/03 08:29:31 pvalchev Exp $";
+static char *rcsid = "$OpenBSD: map.c,v 1.7 2002/08/05 07:24:26 pvalchev Exp $";
#endif /* not lint */
#include "am.h"
@@ -114,10 +114,10 @@ exported_ap_realloc_map(int nsize)
if (nsize < 0 || nsize == exported_ap_size)
return 0;
- exported_ap = (am_node **) xrealloc((voidp) exported_ap, nsize * sizeof(am_node*));
+ exported_ap = (am_node **) xrealloc((void *)exported_ap, nsize * sizeof(am_node*));
if (nsize > exported_ap_size)
- bzero((char*) (exported_ap+exported_ap_size),
+ bzero((char *) (exported_ap+exported_ap_size),
(nsize - exported_ap_size) * sizeof(am_node*));
exported_ap_size = nsize;
@@ -135,7 +135,7 @@ am_node *root_node;
* Fills in the map number of the node,
* but leaves everything else uninitialised.
*/
-am_node *exported_ap_alloc(P_void)
+am_node *exported_ap_alloc(void)
{
am_node *mp, **mpp;
@@ -213,7 +213,7 @@ exported_ap_free(am_node *mp)
/*
* Free the mount node
*/
- free((voidp) mp);
+ free((void *)mp);
}
/*
@@ -664,7 +664,7 @@ map_flush_srvr(fserver *fs)
* automount node to be automounted.
*/
int
-mount_auto_node(char *dir, voidp arg)
+mount_auto_node(char *dir, void *arg)
{
int error = 0;
@@ -730,7 +730,7 @@ make_root_node(void)
* them out.
*/
void
-umount_exported(P_void)
+umount_exported(void)
{
int i;
@@ -838,7 +838,7 @@ flush_kernel_name_cache(am_node *mp)
#endif /* FLUSH_KERNEL_NAME_CACHE */
static int
-unmount_node_wrap(voidp vp)
+unmount_node_wrap(void *vp)
{
#ifndef FLUSH_KERNEL_NAME_CACHE
return unmount_node((am_node*) vp);
@@ -888,7 +888,7 @@ unmount_node_wrap(voidp vp)
}
static void
-free_map_if_success(int rc, int term, voidp closure)
+free_map_if_success(int rc, int term, void *closure)
{
am_node *mp = (am_node *) closure;
mntfs *mf = mp->am_mnt;
@@ -934,7 +934,7 @@ free_map_if_success(int rc, int term, voidp closure)
/*
* Wakeup anything waiting for this mount
*/
- wakeup((voidp) mf);
+ wakeup((void *)mf);
}
static int
@@ -969,8 +969,8 @@ unmount_mp(am_node *mp)
* Note that we are unmounting this node
*/
mf->mf_flags |= MFF_UNMOUNTING;
- run_task(unmount_node_wrap, (voidp) mp,
- free_map_if_success, (voidp) mp);
+ run_task(unmount_node_wrap, (void *)mp,
+ free_map_if_success, (void *)mp);
was_backgrounded = 1;
#ifdef DEBUG
dlog("unmount attempt backgrounded");
@@ -982,7 +982,7 @@ unmount_mp(am_node *mp)
dlog("Trying unmount in foreground");
#endif
mf->mf_flags |= MFF_UNMOUNTING;
- free_map_if_success(unmount_node(mp), 0, (voidp) mp);
+ free_map_if_success(unmount_node(mp), 0, (void *)mp);
#ifdef DEBUG
dlog("unmount attempt done");
#endif /* DEBUG */
diff --git a/usr.sbin/amd/amd/mapc.c b/usr.sbin/amd/amd/mapc.c
index 6f3f737a118..4fd0f7d8738 100644
--- a/usr.sbin/amd/amd/mapc.c
+++ b/usr.sbin/amd/amd/mapc.c
@@ -38,7 +38,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)mapc.c 8.1 (Berkeley) 6/6/93";*/
-static char *rcsid = "$Id: mapc.c,v 1.6 2002/08/03 08:29:31 pvalchev Exp $";
+static char *rcsid = "$Id: mapc.c,v 1.7 2002/08/05 07:24:26 pvalchev Exp $";
#endif /* not lint */
/*
@@ -282,9 +282,9 @@ mapc_showtypes(FILE *fp)
}
}
-static Const char *reg_error = "?";
+static const char *reg_error = "?";
void
-regerror(Const char *m)
+regerror(const char *m)
{
reg_error = m;
}
@@ -482,7 +482,7 @@ mapc_create(char *map, char *opt)
m->modify = modify;
m->search = alloc >= MAPC_ALL ? error_search : mt->search;
m->mtime = mt->mtime;
- bzero((voidp) m->kvhash, sizeof(m->kvhash));
+ bzero((void *)m->kvhash, sizeof(m->kvhash));
m->map_name = strdup(map);
m->refc = 1;
m->wildcard = 0;
@@ -511,17 +511,17 @@ mapc_clear(mnt_map *m)
kv *k = m->kvhash[i];
while (k) {
kv *n = k->next;
- free((voidp) k->key);
+ free((void *)k->key);
if (k->val)
- free((voidp) k->val);
- free((voidp) k);
+ free((void *)k->val);
+ free((void *)k);
k = n;
}
}
/*
* Zero the hash slots
*/
- bzero((voidp) m->kvhash, sizeof(m->kvhash));
+ bzero((void *)m->kvhash, sizeof(m->kvhash));
/*
* Free the wildcard if it exists
*/
@@ -568,9 +568,9 @@ mapc_free(mnt_map *m)
*/
if (m && --m->refc == 0) {
mapc_clear(m);
- free((voidp) m->map_name);
+ free((void *)m->map_name);
rem_que(&m->hdr);
- free((voidp) m);
+ free((void *)m);
}
}
@@ -733,7 +733,7 @@ mapc_sync(mnt_map *m)
* Reload all the maps
* Called when Amd gets hit by a SIGHUP.
*/
-void mapc_reload(P_void)
+void mapc_reload(void)
{
mnt_map *m;
@@ -794,7 +794,7 @@ root_newmap(char *dir, char *opts, char *map)
}
int
-mapc_keyiter(mnt_map *m, void (*fn)(char*,voidp), voidp arg)
+mapc_keyiter(mnt_map *m, void (*fn)(char *,void *), void *arg)
{
int i;
int c = 0;
@@ -818,7 +818,7 @@ mapc_keyiter(mnt_map *m, void (*fn)(char*,voidp), voidp arg)
* Finally throw away the root map.
*/
int
-root_keyiter(void (*fn)(char*,voidp), voidp arg)
+root_keyiter(void (*fn)(char *,void *), void *arg)
{
if (root_map) {
int c = mapc_keyiter(root_map, fn, arg);
diff --git a/usr.sbin/amd/amd/misc_rpc.c b/usr.sbin/amd/amd/misc_rpc.c
index 27f02d429de..f3e750de7f1 100644
--- a/usr.sbin/amd/amd/misc_rpc.c
+++ b/usr.sbin/amd/amd/misc_rpc.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)misc_rpc.c 8.1 (Berkeley) 6/6/93
- * $Id: misc_rpc.c,v 1.5 2002/08/03 08:29:31 pvalchev Exp $
+ * $Id: misc_rpc.c,v 1.6 2002/08/05 07:24:26 pvalchev Exp $
*/
/*
@@ -46,9 +46,9 @@
#include "am.h"
void rpc_msg_init(struct rpc_msg *, u_long, u_long, u_long);
-int pickup_rpc_reply(voidp, int, voidp, xdrproc_t);
+int pickup_rpc_reply(void *, int, void *, xdrproc_t);
int make_rpc_packet(char *, int, unsigned long, struct rpc_msg *,
- voidp, xdrproc_t, AUTH *);
+ void *, xdrproc_t, AUTH *);
void
rpc_msg_init(struct rpc_msg *mp, unsigned long prog,
@@ -57,7 +57,7 @@ rpc_msg_init(struct rpc_msg *mp, unsigned long prog,
/*
* Initialise the message
*/
- bzero((voidp) mp, sizeof(*mp));
+ bzero((void *)mp, sizeof(*mp));
mp->rm_xid = 0;
mp->rm_direction = CALL;
mp->rm_call.cb_rpcvers = RPC_MSG_VERSION;
@@ -70,7 +70,7 @@ rpc_msg_init(struct rpc_msg *mp, unsigned long prog,
* Field reply to call to mountd
*/
int
-pickup_rpc_reply(voidp pkt, int len, voidp where, xdrproc_t where_xdr)
+pickup_rpc_reply(void *pkt, int len, void *where, xdrproc_t where_xdr)
{
XDR reply_xdr;
int ok;
@@ -78,8 +78,8 @@ pickup_rpc_reply(voidp pkt, int len, voidp where, xdrproc_t where_xdr)
struct rpc_msg reply_msg;
int error = 0;
- /*bzero((voidp) &err, sizeof(err));*/
- bzero((voidp) &reply_msg, sizeof(reply_msg));
+ /*bzero((void *)&err, sizeof(err));*/
+ bzero((void *)&reply_msg, sizeof(reply_msg));
reply_msg.acpted_rply.ar_results.where = (caddr_t) where;
reply_msg.acpted_rply.ar_results.proc = where_xdr;
@@ -111,7 +111,7 @@ drop:
int
make_rpc_packet(char *buf, int buflen, unsigned long proc,
- struct rpc_msg *mp, voidp arg, xdrproc_t arg_xdr, AUTH *auth)
+ struct rpc_msg *mp, void *arg, xdrproc_t arg_xdr, AUTH *auth)
{
XDR msg_xdr;
int len;
diff --git a/usr.sbin/amd/amd/mntfs.c b/usr.sbin/amd/amd/mntfs.c
index fd05e4f7f43..6965555f9d7 100644
--- a/usr.sbin/amd/amd/mntfs.c
+++ b/usr.sbin/amd/amd/mntfs.c
@@ -38,7 +38,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)mntfs.c 8.1 (Berkeley) 6/6/93";*/
-static char *rcsid = "$Id: mntfs.c,v 1.3 2002/08/03 08:29:31 pvalchev Exp $";
+static char *rcsid = "$Id: mntfs.c,v 1.4 2002/08/05 07:24:26 pvalchev Exp $";
#endif /* not lint */
@@ -177,7 +177,7 @@ find_mntfs(am_ops *ops, am_opts *mo, char *mp, char *info,
/*
* Remember who we are restarting
*/
- mf2->mf_private = (voidp) dup_mntfs(mf);
+ mf2->mf_private = (void *)dup_mntfs(mf);
mf2->mf_prfree = free_mntfs;
return mf2;
}
@@ -215,10 +215,10 @@ new_mntfs()
static void
uninit_mntfs(mntfs *mf, int rmd)
{
- if (mf->mf_auto) free((voidp) mf->mf_auto);
- if (mf->mf_mopts) free((voidp) mf->mf_mopts);
- if (mf->mf_remopts) free((voidp) mf->mf_remopts);
- if (mf->mf_info) free((voidp) mf->mf_info);
+ if (mf->mf_auto) free((void *)mf->mf_auto);
+ if (mf->mf_mopts) free((void *)mf->mf_mopts);
+ if (mf->mf_remopts) free((void *)mf->mf_remopts);
+ if (mf->mf_info) free((void *)mf->mf_info);
if (mf->mf_private && mf->mf_prfree)
(*mf->mf_prfree)(mf->mf_private);
/*
@@ -226,7 +226,7 @@ uninit_mntfs(mntfs *mf, int rmd)
*/
if (rmd && (mf->mf_flags & MFF_MKMNT))
rmdirs(mf->mf_mount);
- if (mf->mf_mount) free((voidp) mf->mf_mount);
+ if (mf->mf_mount) free((void *)mf->mf_mount);
/*
* Clean up the file server
@@ -251,7 +251,7 @@ discard_mntfs(mntfs *mf)
* Free memory
*/
uninit_mntfs(mf, TRUE);
- free((voidp) mf);
+ free((void *)mf);
--mntfs_allocated;
}
@@ -306,7 +306,7 @@ free_mntfs(mntfs *mf)
if (mf->mf_flags & (MFF_MOUNTED|MFF_MOUNTING|MFF_UNMOUNTING))
dlog("mntfs reference for %s still active", mf->mf_mount);
#endif /* DEBUG */
- mf->mf_cid = timeout(ALLOWED_MOUNT_TIME, discard_mntfs, (voidp) mf);
+ mf->mf_cid = timeout(ALLOWED_MOUNT_TIME, discard_mntfs, (void *)mf);
}
}
}
diff --git a/usr.sbin/amd/amd/mtab.c b/usr.sbin/amd/amd/mtab.c
index 45f8befbc5f..aef085f8128 100644
--- a/usr.sbin/amd/amd/mtab.c
+++ b/usr.sbin/amd/amd/mtab.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)mtab.c 8.1 (Berkeley) 6/6/93
- * $Id: mtab.c,v 1.3 2002/08/03 08:29:31 pvalchev Exp $
+ * $Id: mtab.c,v 1.4 2002/08/05 07:24:26 pvalchev Exp $
*/
#include "am.h"
@@ -51,7 +51,7 @@ mnt_free(struct mntent *mp)
free(mp->mnt_dir);
free(mp->mnt_type);
free(mp->mnt_opts);
- free((voidp) mp);
+ free((void *)mp);
}
/*
@@ -66,7 +66,7 @@ discard_mntlist(mntlist *mp)
mp = mp->mnext;
if (mp2->mnt)
mnt_free(mp2->mnt);
- free((voidp) mp2);
+ free((void *)mp2);
}
}
diff --git a/usr.sbin/amd/amd/nfs_ops.c b/usr.sbin/amd/amd/nfs_ops.c
index be75d704bf8..f0c21e4aba6 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.15 2002/08/03 08:29:31 pvalchev Exp $ */
+/* $OpenBSD: nfs_ops.c,v 1.16 2002/08/05 07:24:26 pvalchev Exp $ */
/*-
* Copyright (c) 1990 Jan-Simon Pendry
@@ -40,7 +40,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)nfs_ops.c 8.1 (Berkeley) 6/6/93";*/
-static char *rcsid = "$OpenBSD: nfs_ops.c,v 1.15 2002/08/03 08:29:31 pvalchev Exp $";
+static char *rcsid = "$OpenBSD: nfs_ops.c,v 1.16 2002/08/05 07:24:26 pvalchev Exp $";
#endif /* not lint */
#include "am.h"
@@ -93,7 +93,7 @@ typedef nfs_fh fhandle_t;
typedef struct fh_cache fh_cache;
struct fh_cache {
qelem fh_q; /* List header */
- voidp fh_wchan; /* Wait channel */
+ void *fh_wchan; /* Wait channel */
int fh_error; /* Valid data? */
int fh_id; /* Unique id */
int fh_cid; /* Callout id */
@@ -116,12 +116,12 @@ static int fh_id = 0;
extern qelem fh_head;
qelem fh_head = { &fh_head, &fh_head };
-static int call_mountd(fh_cache*, unsigned long, fwd_fun, voidp);
+static int call_mountd(fh_cache*, unsigned long, fwd_fun, void *);
AUTH *nfs_auth;
static fh_cache *
-find_nfs_fhandle_cache(voidp idv, int done)
+find_nfs_fhandle_cache(void *idv, int done)
{
fh_cache *fp, *fp2 = 0;
/* XXX EVIL XXX */
@@ -154,15 +154,15 @@ find_nfs_fhandle_cache(voidp idv, int done)
* Called when a filehandle appears
*/
static void
-got_nfs_fh(voidp pkt, int len, struct sockaddr_in *sa,
- struct sockaddr_in *ia, voidp idv, int done)
+got_nfs_fh(void *pkt, int len, struct sockaddr_in *sa,
+ struct sockaddr_in *ia, void *idv, int done)
{
fh_cache *fp = find_nfs_fhandle_cache(idv, done);
if (fp) {
#if NFS_PROTOCOL_VERSION >= 3
fp->fh_handle.fhs_vers = MOUNTVERS;
#endif
- fp->fh_error = pickup_rpc_reply(pkt, len, (voidp) &fp->fh_handle, xdr_fhstatus);
+ fp->fh_error = pickup_rpc_reply(pkt, len, (void *)&fp->fh_handle, xdr_fhstatus);
if (!fp->fh_error) {
#ifdef DEBUG
dlog("got filehandle for %s:%s", fp->fh_fs->fs_host, fp->fh_path);
@@ -200,15 +200,15 @@ discard_fh(fh_cache *fp)
dlog("Discarding filehandle for %s:%s", fp->fh_fs->fs_host, fp->fh_path);
#endif /* DEBUG */
free_srvr(fp->fh_fs);
- free((voidp) fp->fh_path);
- free((voidp) fp);
+ free((void *)fp->fh_path);
+ free((void *)fp);
}
/*
* Determine the file handle for a node
*/
static int
-prime_nfs_fhandle_cache(char *path, fserver *fs, fhstatus *fhbuf, voidp wchan)
+prime_nfs_fhandle_cache(char *path, fserver *fs, fhstatus *fhbuf, void *wchan)
{
fh_cache *fp, *fp_save = 0;
int error;
@@ -228,11 +228,11 @@ prime_nfs_fhandle_cache(char *path, fserver *fs, fhstatus *fhbuf, voidp wchan)
error = fp->fh_error = unx_error(fp->fh_handle.fhs_stat);
if (error == 0) {
if (fhbuf)
- bcopy((voidp) &fp->fh_handle, (voidp) fhbuf,
+ bcopy((void *)&fp->fh_handle, (void *)fhbuf,
sizeof(fp->fh_handle));
if (fp->fh_cid)
untimeout(fp->fh_cid);
- fp->fh_cid = timeout(FH_TTL, discard_fh, (voidp) fp);
+ fp->fh_cid = timeout(FH_TTL, discard_fh, (void *)fp);
} else if (error == EACCES) {
/*
* Now decode the file handle return code.
@@ -291,14 +291,14 @@ prime_nfs_fhandle_cache(char *path, fserver *fs, fhstatus *fhbuf, voidp wchan)
free(fp->fh_path);
} else {
fp = ALLOC(fh_cache);
- bzero((voidp) fp, sizeof(*fp));
+ bzero((void *)fp, sizeof(*fp));
ins_que(&fp->fh_q, &fh_head);
}
if (!reuse_id)
fp->fh_id = FHID_ALLOC();
fp->fh_wchan = wchan;
fp->fh_error = -1;
- fp->fh_cid = timeout(FH_TTL, discard_fh, (voidp) fp);
+ fp->fh_cid = timeout(FH_TTL, discard_fh, (void *)fp);
/*
* If the address has changed then don't try to re-use the
@@ -319,7 +319,7 @@ prime_nfs_fhandle_cache(char *path, fserver *fs, fhstatus *fhbuf, voidp wchan)
*/
untimeout(fp->fh_cid);
fp->fh_cid = timeout(error < 0 ? 2 * ALLOWED_MOUNT_TIME : FH_TTL_ERROR,
- discard_fh, (voidp) fp);
+ discard_fh, (void *)fp);
fp->fh_error = error;
} else {
error = fp->fh_error;
@@ -348,7 +348,7 @@ make_nfs_auth(void)
}
static int
-call_mountd(fh_cache *fp, u_long proc, fwd_fun f, voidp wchan)
+call_mountd(fh_cache *fp, u_long proc, fwd_fun f, void *wchan)
{
struct rpc_msg mnt_msg;
int len;
@@ -371,7 +371,7 @@ call_mountd(fh_cache *fp, u_long proc, fwd_fun f, voidp wchan)
rpc_msg_init(&mnt_msg, MOUNTPROG, MOUNTVERS, (unsigned long) 0);
len = make_rpc_packet(iobuf, sizeof(iobuf), proc,
- &mnt_msg, (voidp) &fp->fh_path, xdr_nfspath, nfs_auth);
+ &mnt_msg, (void *)&fp->fh_path, xdr_nfspath, nfs_auth);
/*
* XXX EVIL! We cast fh_id to a pointer, then back to an int
@@ -379,7 +379,7 @@ call_mountd(fh_cache *fp, u_long proc, fwd_fun f, voidp wchan)
*/
if (len > 0) {
error = fwd_packet(MK_RPC_XID(RPC_XID_MOUNTD, fp->fh_id),
- (voidp) iobuf, len, &fp->fh_sin, &fp->fh_sin, (voidp) ((long)fp->fh_id), f);
+ (void *)iobuf, len, &fp->fh_sin, &fp->fh_sin, (void *)((long)fp->fh_id), f);
} else {
error = -len;
}
@@ -446,11 +446,11 @@ nfs_init(mntfs *mf)
if (colon == 0)
return ENOENT;
- error = prime_nfs_fhandle_cache(colon+1, mf->mf_server, &fhs, (voidp) mf);
+ error = prime_nfs_fhandle_cache(colon+1, mf->mf_server, &fhs, (void *)mf);
if (!error) {
- mf->mf_private = (voidp) ALLOC(fhstatus);
+ mf->mf_private = (void *)ALLOC(fhstatus);
mf->mf_prfree = (void (*)()) free;
- bcopy((voidp) &fhs, mf->mf_private, sizeof(fhs));
+ bcopy((void *)&fhs, mf->mf_private, sizeof(fhs));
}
return error;
}
@@ -478,7 +478,7 @@ mount_nfs_fh(fhstatus *fhp, char *dir, char *fs_name, char *opts,
MTYPE_TYPE type = MOUNT_TYPE_NFS;
- bzero((voidp) &nfs_args, sizeof(nfs_args)); /* Paranoid */
+ bzero((void *)&nfs_args, sizeof(nfs_args)); /* Paranoid */
/*
* Extract host name to give to kernel
@@ -499,7 +499,7 @@ mount_nfs_fh(fhstatus *fhp, char *dir, char *fs_name, char *opts,
else
xopts = strdup(opts);
- bzero((voidp) &nfs_args, sizeof(nfs_args));
+ bzero((void *)&nfs_args, sizeof(nfs_args));
mnt.mnt_dir = dir;
mnt.mnt_fsname = fs_name;
@@ -688,7 +688,7 @@ mount_nfs(char *dir, char *fs_name, char *opts, mntfs *mf)
#ifdef DEBUG
dlog("locating fhandle for %s", fs_name);
#endif /* DEBUG */
- error = prime_nfs_fhandle_cache(colon+1, mf->mf_server, &fhs, (voidp) 0);
+ error = prime_nfs_fhandle_cache(colon+1, mf->mf_server, &fhs, (void *)0);
if (error)
return error;
@@ -772,8 +772,8 @@ nfs_umounted(am_node *mp)
f.fh_fs = fs;
f.fh_id = 0;
f.fh_error = 0;
- (void) prime_nfs_fhandle_cache(colon+1, mf->mf_server, (fhstatus *) 0, (voidp) mf);
- (void) call_mountd(&f, MOUNTPROC_UMNT, (fwd_fun) 0, (voidp) 0);
+ (void) prime_nfs_fhandle_cache(colon+1, mf->mf_server, (fhstatus *) 0, (void *)mf);
+ (void) call_mountd(&f, MOUNTPROC_UMNT, (fwd_fun) 0, (void *)0);
*colon = ':';
}
#endif /* INFORM_MOUNTD */
diff --git a/usr.sbin/amd/amd/nfs_start.c b/usr.sbin/amd/amd/nfs_start.c
index 253e458033d..145d849c61a 100644
--- a/usr.sbin/amd/amd/nfs_start.c
+++ b/usr.sbin/amd/amd/nfs_start.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)nfs_start.c 8.1 (Berkeley) 6/6/93
- * $Id: nfs_start.c,v 1.10 2002/08/03 08:29:31 pvalchev Exp $
+ * $Id: nfs_start.c,v 1.11 2002/08/05 07:24:26 pvalchev Exp $
*/
#include "am.h"
@@ -70,7 +70,7 @@ int max_fds = -1;
* Check that we are not burning resources
*/
static void
-checkup(P_void)
+checkup(void)
{
static int max_fd = 0;
static char *max_mem = 0;
@@ -198,7 +198,7 @@ rpc_pending_now()
}
static serv_state
-run_rpc(P_void)
+run_rpc(void)
{
sigset_t mask, omask;
@@ -374,7 +374,7 @@ bindnfs_port(int so)
}
void
-unregister_amq(P_void)
+unregister_amq(void)
{
#ifdef DEBUG
Debug(D_AMQ)
diff --git a/usr.sbin/amd/amd/nfs_subr.c b/usr.sbin/amd/amd/nfs_subr.c
index 5b58b10c5d4..2b45017a3b4 100644
--- a/usr.sbin/amd/amd/nfs_subr.c
+++ b/usr.sbin/amd/amd/nfs_subr.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)nfs_subr.c 8.1 (Berkeley) 6/6/93
- * $Id: nfs_subr.c,v 1.3 2002/08/03 08:29:31 pvalchev Exp $
+ * $Id: nfs_subr.c,v 1.4 2002/08/05 07:24:26 pvalchev Exp $
*/
#include "am.h"
@@ -83,12 +83,12 @@ do_readlink(am_node *mp, int *error_return, struct attrstat **attrpp)
}
/*ARGSUSED*/
-voidp
-nfsproc_null_2(voidp argp, struct svc_req *rqstp)
+void *
+nfsproc_null_2(void *argp, struct svc_req *rqstp)
{
static char res;
- return (voidp) &res;
+ return (void *)&res;
}
@@ -155,12 +155,12 @@ nfsproc_setattr_2(struct sattrargs *argp, struct svc_req *rqstp)
/*ARGSUSED*/
-voidp
-nfsproc_root_2(voidp argp, struct svc_req *rqstp)
+void *
+nfsproc_root_2(void *argp, struct svc_req *rqstp)
{
static char res;
- return (voidp)&res;
+ return (void *)&res;
}
@@ -264,12 +264,12 @@ nfsproc_read_2(struct readargs *argp, struct svc_req *rqstp)
/*ARGSUSED*/
-voidp
-nfsproc_writecache_2(voidp argp, struct svc_req *rqstp)
+void *
+nfsproc_writecache_2(void *argp, struct svc_req *rqstp)
{
static char res;
- return (voidp) &res;
+ return (void *)&res;
}
diff --git a/usr.sbin/amd/amd/nfsx_ops.c b/usr.sbin/amd/amd/nfsx_ops.c
index 25b61379092..7d869c6cdd3 100644
--- a/usr.sbin/amd/amd/nfsx_ops.c
+++ b/usr.sbin/amd/amd/nfsx_ops.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)nfsx_ops.c 8.1 (Berkeley) 6/6/93
- * $Id: nfsx_ops.c,v 1.4 2002/08/03 08:29:31 pvalchev Exp $
+ * $Id: nfsx_ops.c,v 1.5 2002/08/05 07:24:26 pvalchev Exp $
*/
#include "am.h"
@@ -86,7 +86,7 @@ nfsx_match(am_opts *fo)
/* fiddle sublink, must be last... */
if (fo->opt_sublink) {
plog(XLOG_WARNING, "nfsx: sublink %s ignored", fo->opt_sublink);
- free((voidp) fo->opt_sublink);
+ free((void *)fo->opt_sublink);
fo->opt_sublink = 0;
}
#endif
@@ -131,7 +131,7 @@ nfsx_match(am_opts *fo)
}
static void
-nfsx_prfree(voidp vp)
+nfsx_prfree(void *vp)
{
struct nfsx *nx = (struct nfsx *) vp;
int i;
@@ -142,8 +142,8 @@ nfsx_prfree(voidp vp)
free_mntfs(m);
}
- free((voidp) nx->nx_v);
- free((voidp) nx);
+ free((void *)nx->nx_v);
+ free((void *)nx);
}
static int
@@ -189,7 +189,7 @@ nfsx_init(mntfs *mf)
;
nx = ALLOC(nfsx);
- mf->mf_private = (voidp) nx;
+ mf->mf_private = (void *)nx;
mf->mf_prfree = nfsx_prfree;
nx->nx_c = i - 1; /* i-1 because we don't want the prefix */
@@ -227,7 +227,7 @@ nfsx_init(mntfs *mf)
if (xinfo) free(xinfo);
}
- free((voidp) ivec);
+ free((void *)ivec);
errexit:
if (info)
free(info);
@@ -261,7 +261,7 @@ errexit:
glob_error = -1;
if (!asked_for_wakeup) {
asked_for_wakeup = 1;
- sched_task(wakeup_task, (voidp) mf, (voidp) m);
+ sched_task(wakeup_task, (void *)mf, (void *)m);
}
}
}
@@ -270,7 +270,7 @@ errexit:
}
static void
-nfsx_cont(int rc, int term, voidp closure)
+nfsx_cont(int rc, int term, void *closure)
{
mntfs *mf = (mntfs *) closure;
struct nfsx *nx = (struct nfsx *) mf->mf_private;
@@ -282,7 +282,7 @@ nfsx_cont(int rc, int term, voidp closure)
/*
* Wakeup anything waiting for this mount
*/
- wakeup((voidp) n->n_mnt);
+ wakeup((void *)n->n_mnt);
if (rc || term) {
if (term) {
@@ -315,14 +315,14 @@ nfsx_cont(int rc, int term, voidp closure)
* Do the remaining bits
*/
if (nfsx_fmount(mf) >= 0) {
- wakeup((voidp) mf);
+ wakeup((void *)mf);
mf->mf_flags &= ~MFF_MOUNTING;
mf_mounted(mf);
}
}
static int
-try_nfsx_mount(voidp mv)
+try_nfsx_mount(void *mv)
{
mntfs *mf = (mntfs *) mv;
int error;
@@ -374,7 +374,7 @@ nfsx_remount(mntfs *mf, int fg)
dlog("backgrounding mount of \"%s\"", m->mf_info);
#endif
nx->nx_try = n;
- run_task(try_nfsx_mount, (voidp) m, nfsx_cont, (voidp) mf);
+ run_task(try_nfsx_mount, (void *)m, nfsx_cont, (void *)mf);
n->n_error = -1;
return -1;
} else {
diff --git a/usr.sbin/amd/amd/opts.c b/usr.sbin/amd/amd/opts.c
index 7a7d078d6db..a4550d896db 100644
--- a/usr.sbin/amd/amd/opts.c
+++ b/usr.sbin/amd/amd/opts.c
@@ -38,7 +38,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)opts.c 8.1 (Berkeley) 6/6/93";*/
-static char *rcsid = "$Id: opts.c,v 1.4 2002/08/03 08:29:31 pvalchev Exp $";
+static char *rcsid = "$Id: opts.c,v 1.5 2002/08/05 07:24:26 pvalchev Exp $";
#endif /* not lint */
#include "am.h"
@@ -745,9 +745,9 @@ eval_fs_opts(am_opts *fo, char *opts, char *g_opts, char *path,
/*
* Clear out the option table
*/
- bzero((voidp) &fs_static, sizeof(fs_static));
- bzero((voidp) vars, sizeof(vars));
- bzero((voidp) fo, sizeof(*fo));
+ bzero((void *)&fs_static, sizeof(fs_static));
+ bzero((void *)vars, sizeof(vars));
+ bzero((void *)fo, sizeof(*fo));
/*
* Set key, map & path before expansion
diff --git a/usr.sbin/amd/amd/pfs_ops.c b/usr.sbin/amd/amd/pfs_ops.c
index 6031403107b..8474c04c4af 100644
--- a/usr.sbin/amd/amd/pfs_ops.c
+++ b/usr.sbin/amd/amd/pfs_ops.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)pfs_ops.c 8.1 (Berkeley) 6/6/93
- * $Id: pfs_ops.c,v 1.4 2002/08/03 08:29:31 pvalchev Exp $
+ * $Id: pfs_ops.c,v 1.5 2002/08/05 07:24:26 pvalchev Exp $
*/
#include "am.h"
@@ -72,7 +72,7 @@ pfs_init(mntfs *mf)
* Save unmount command
*/
if (mf->mf_refc == 1) {
- mf->mf_private = (voidp) strdup(mf->mf_fo->opt_unmount);
+ mf->mf_private = (void *)strdup(mf->mf_fo->opt_unmount);
mf->mf_prfree = (void (*) ()) free;
}
return 0;
@@ -127,8 +127,8 @@ pfs_exec(char *info)
/*
* Free allocate memory
*/
- free((voidp) info);
- free((voidp) xivec);
+ free((void *)info);
+ free((void *)xivec);
/*
* Return error
*/
diff --git a/usr.sbin/amd/amd/rpc_fwd.c b/usr.sbin/amd/amd/rpc_fwd.c
index b246bb8bfad..383917f250a 100644
--- a/usr.sbin/amd/amd/rpc_fwd.c
+++ b/usr.sbin/amd/amd/rpc_fwd.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)rpc_fwd.c 8.1 (Berkeley) 6/6/93
- * $Id: rpc_fwd.c,v 1.4 2002/08/03 08:29:31 pvalchev Exp $
+ * $Id: rpc_fwd.c,v 1.5 2002/08/05 07:24:26 pvalchev Exp $
*/
/*
@@ -73,7 +73,7 @@ struct rpc_forward {
u_int rf_xid; /* Packet id */
u_int rf_oldid; /* Original packet id */
fwd_fun rf_fwd; /* Forwarding function */
- voidp rf_ptr;
+ void * rf_ptr;
struct sockaddr_in rf_sin;
};
@@ -160,7 +160,7 @@ fwd_free(rpc_forward *p)
#ifdef DEBUG
/*dlog("fwd_free: rpc_head = %#x", rpc_head.q_forw);*/
#endif /* DEBUG */
- free((voidp) p);
+ free((void *)p);
}
/*
@@ -219,8 +219,8 @@ fwd_locate(u_int id)
* different address.
*/
int
-fwd_packet(int type_id, voidp pkt, int len, struct sockaddr_in *fwdto,
- struct sockaddr_in *replyto, voidp i, fwd_fun cb)
+fwd_packet(int type_id, void *pkt, int len, struct sockaddr_in *fwdto,
+ struct sockaddr_in *replyto, void *i, fwd_fun cb)
{
rpc_forward *p;
u_int *pkt_int;
@@ -306,7 +306,7 @@ fwd_packet(int type_id, voidp pkt, int len, struct sockaddr_in *fwdto,
if (replyto)
p->rf_sin = *replyto;
else
- bzero((voidp) &p->rf_sin, sizeof(p->rf_sin));
+ bzero((void *)&p->rf_sin, sizeof(p->rf_sin));
p->rf_ptr = i;
return error;
@@ -320,7 +320,7 @@ fwd_reply()
{
int len;
#ifdef DYNAMIC_BUFFERS
- voidp pkt;
+ void *pkt;
#else
u_int pkt[MAX_PACKET_SIZE/sizeof(u_int)+1];
#endif /* DYNAMIC_BUFFERS */
@@ -342,7 +342,7 @@ fwd_reply()
/*
* Allocate a buffer
*/
- pkt = (voidp) malloc((unsigned) len);
+ pkt = (void *)malloc((unsigned) len);
if (!pkt) {
plog(XLOG_ERROR, "Out of buffers in fwd_reply");
return;
@@ -411,7 +411,7 @@ again:
/*
* Call forwarding function
*/
- (*p->rf_fwd)((voidp) pkt, rc, &src_addr, &p->rf_sin, p->rf_ptr, TRUE);
+ (*p->rf_fwd)((void *)pkt, rc, &src_addr, &p->rf_sin, p->rf_ptr, TRUE);
}
/*
@@ -424,6 +424,6 @@ out:;
/*
* Free the packet
*/
- free((voidp) pkt);
+ free((void *)pkt);
#endif /* DYNAMIC_BUFFERS */
}
diff --git a/usr.sbin/amd/amd/sched.c b/usr.sbin/amd/amd/sched.c
index 4b6c90979f5..f8a3f02b42c 100644
--- a/usr.sbin/amd/amd/sched.c
+++ b/usr.sbin/amd/amd/sched.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)sched.c 8.1 (Berkeley) 6/6/93
- * $Id: sched.c,v 1.7 2002/08/03 08:29:31 pvalchev Exp $
+ * $Id: sched.c,v 1.8 2002/08/05 07:24:26 pvalchev Exp $
*/
/*
@@ -55,9 +55,9 @@ struct pjob {
qelem hdr; /* Linked list */
pid_t pid; /* Process ID of job */
cb_fun cb_fun; /* Callback function */
- voidp cb_closure; /* Closure for callback */
+ void *cb_closure; /* Closure for callback */
union wait w; /* Status filled in by sigchld */
- voidp wchan; /* Wait channel */
+ void *wchan; /* Wait channel */
};
extern qelem proc_list_head;
@@ -87,7 +87,7 @@ rem_que(qelem *elem)
}
static pjob *
-sched_job(cb_fun cf, voidp ca)
+sched_job(cb_fun cf, void *ca)
{
pjob *p = ALLOC(pjob);
@@ -103,12 +103,12 @@ sched_job(cb_fun cf, voidp ca)
}
void
-run_task(task_fun tf, voidp ta, cb_fun cf, voidp ca)
+run_task(task_fun tf, void *ta, cb_fun cf, void *ca)
{
pjob *p = sched_job(cf, ca);
sigset_t mask, omask;
- p->wchan = (voidp) p;
+ p->wchan = (void *)p;
sigemptyset(&mask);
sigaddset(&mask, SIGCHLD);
@@ -128,7 +128,7 @@ run_task(task_fun tf, voidp ta, cb_fun cf, voidp ca)
* Schedule a task to be run when woken up
*/
void
-sched_task(cb_fun cf, voidp ca, voidp wchan)
+sched_task(cb_fun cf, void *ca, void *wchan)
{
/*
* Allocate a new task
@@ -139,7 +139,7 @@ sched_task(cb_fun cf, voidp ca, voidp wchan)
#endif
p->wchan = wchan;
p->pid = 0;
- bzero((voidp) &p->w, sizeof(p->w));
+ bzero((void *)&p->w, sizeof(p->w));
}
static void
@@ -151,7 +151,7 @@ wakeupjob(pjob *p)
}
void
-wakeup(voidp wchan)
+wakeup(void *wchan)
{
pjob *p, *p2;
#ifdef DEBUG_SLEEP
@@ -185,7 +185,7 @@ wakeup(voidp wchan)
}
void
-wakeup_task(int rc, int term, voidp cl)
+wakeup_task(int rc, int term, void *cl)
{
wakeup(cl);
}
@@ -243,7 +243,7 @@ sigchld(int sig)
* This must be called with SIGCHLD disabled
*/
void
-do_task_notify(P_void)
+do_task_notify(void)
{
/*
* Keep taking the first item off the list and processing it.
@@ -267,6 +267,6 @@ do_task_notify(P_void)
(*p->cb_fun)(p->w.w_retcode,
p->w.w_termsig, p->cb_closure);
- free((voidp) p);
+ free((void *)p);
}
}
diff --git a/usr.sbin/amd/amd/srvr_afs.c b/usr.sbin/amd/amd/srvr_afs.c
index ca7bbb88fa7..97e4736200b 100644
--- a/usr.sbin/amd/amd/srvr_afs.c
+++ b/usr.sbin/amd/amd/srvr_afs.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)srvr_afs.c 8.1 (Berkeley) 6/6/93
- * $Id: srvr_afs.c,v 1.2 2002/08/03 08:29:31 pvalchev Exp $
+ * $Id: srvr_afs.c,v 1.3 2002/08/05 07:24:26 pvalchev Exp $
*/
/*
@@ -92,7 +92,7 @@ void
wakeup_srvr(fserver *fs)
{
fs->fs_flags &= ~FSF_WANT;
- wakeup((voidp) fs);
+ wakeup((void *)fs);
}
/*
@@ -126,17 +126,17 @@ timeout_srvr(fserver *fs)
* Free the net address
*/
if (fs->fs_ip)
- free((voidp) fs->fs_ip);
+ free((void *)fs->fs_ip);
/*
* Free the host name.
*/
- free((voidp) fs->fs_host);
+ free((void *)fs->fs_host);
/*
* Discard the fserver object.
*/
- free((voidp) fs);
+ free((void *)fs);
}
}
@@ -167,7 +167,7 @@ free_srvr(fserver *fs)
/*
* Keep structure lying around for a while
*/
- fs->fs_cid = timeout(ttl, timeout_srvr, (voidp) fs);
+ fs->fs_cid = timeout(ttl, timeout_srvr, (void *)fs);
/*
* Mark the fileserver down and invalid again
*/
diff --git a/usr.sbin/amd/amd/srvr_nfs.c b/usr.sbin/amd/amd/srvr_nfs.c
index 6a99c9299d8..572ba587664 100644
--- a/usr.sbin/amd/amd/srvr_nfs.c
+++ b/usr.sbin/amd/amd/srvr_nfs.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)srvr_nfs.c 8.1 (Berkeley) 6/6/93
- * $Id: srvr_nfs.c,v 1.4 2002/08/03 08:29:31 pvalchev Exp $
+ * $Id: srvr_nfs.c,v 1.5 2002/08/05 07:24:26 pvalchev Exp $
*/
/*
@@ -109,7 +109,7 @@ flush_srvr_nfs_cache(void)
* Startup the NFS ping
*/
static void
-start_ping(P_void)
+start_ping(void)
{
XDR ping_xdr;
struct rpc_msg ping_msg;
@@ -146,8 +146,8 @@ start_ping(P_void)
*/
/*ARGSUSED*/
static void
-got_portmap(voidp pkt, int len, struct sockaddr_in *sa,
- struct sockaddr_in *ia, voidp idv, int done)
+got_portmap(void *pkt, int len, struct sockaddr_in *sa,
+ struct sockaddr_in *ia, void *idv, int done)
{
fserver *fs2 = (fserver *) idv;
fserver *fs = 0;
@@ -161,7 +161,7 @@ got_portmap(voidp pkt, int len, struct sockaddr_in *sa,
if (fs == fs2) {
u_long port = 0; /* XXX - should be short but protocol is naff */
- int error = done ? pickup_rpc_reply(pkt, len, (voidp) &port, xdr_u_long) : -1;
+ int error = done ? pickup_rpc_reply(pkt, len, (void *)&port, xdr_u_long) : -1;
nfs_private *np = (nfs_private *) fs->fs_private;
if (!error && port) {
#ifdef DEBUG
@@ -217,14 +217,14 @@ call_portmap(fserver *fs, AUTH *auth, unsigned long prog,
pmap.pm_prot = prot;
pmap.pm_port = 0;
len = make_rpc_packet(iobuf, sizeof(iobuf), PMAPPROC_GETPORT,
- &pmap_msg, (voidp) &pmap, xdr_pmap, auth);
+ &pmap_msg, (void *)&pmap, xdr_pmap, auth);
if (len > 0) {
struct sockaddr_in sin;
- bzero((voidp) &sin, sizeof(sin));
+ bzero((void *)&sin, sizeof(sin));
sin = *fs->fs_ip;
sin.sin_port = htons(PMAPPORT);
- error = fwd_packet(RPC_XID_PORTMAP, (voidp) iobuf, len,
- &sin, &sin, (voidp) fs, got_portmap);
+ error = fwd_packet(RPC_XID_PORTMAP, (void *)iobuf, len,
+ &sin, &sin, (void *)fs, got_portmap);
} else {
error = -len;
}
@@ -259,8 +259,8 @@ recompute_portmap(fserver *fs)
*/
/*ARGSUSED*/
static void
-nfs_pinged(voidp pkt, int len, struct sockaddr_in *sp,
- struct sockaddr_in *tsp, voidp idv, int done)
+nfs_pinged(void *pkt, int len, struct sockaddr_in *sp,
+ struct sockaddr_in *tsp, void *idv, int done)
{
/* XXX EVIL! XXX */
int xid = (int) ((long)idv);
@@ -319,7 +319,7 @@ nfs_pinged(voidp pkt, int len, struct sockaddr_in *sp,
* Adjust ping interval
*/
untimeout(fs->fs_cid);
- fs->fs_cid = timeout(fs->fs_pinger, nfs_keepalive, (voidp) fs);
+ fs->fs_cid = timeout(fs->fs_pinger, nfs_keepalive, (void *)fs);
/*
* Update ttl for this server
@@ -451,8 +451,8 @@ nfs_keepalive(fserver *fs)
* XXX EVIL! We cast xid to a pointer, then back to an int when
* XXX we get the reply.
*/
- error = fwd_packet(MK_RPC_XID(RPC_XID_NFSPING, np->np_xid), (voidp) ping_buf,
- ping_len, fs->fs_ip, (struct sockaddr_in *) 0, (voidp) ((long)np->np_xid), nfs_pinged);
+ error = fwd_packet(MK_RPC_XID(RPC_XID_NFSPING, np->np_xid), (void *)ping_buf,
+ ping_len, fs->fs_ip, (struct sockaddr_in *) 0, (void *)((long)np->np_xid), nfs_pinged);
/*
* See if a hard error occured
@@ -506,11 +506,11 @@ nfs_keepalive(fserver *fs)
dlog("NFS timeout in %d seconds", fstimeo);
#endif /* DEBUG */
- fs->fs_cid = timeout(fstimeo, nfs_timed_out, (voidp) fs);
+ fs->fs_cid = timeout(fstimeo, nfs_timed_out, (void *)fs);
}
int
-nfs_srvr_port(fserver *fs, u_short *port, voidp wchan)
+nfs_srvr_port(fserver *fs, u_short *port, void *wchan)
{
int error = -1;
if ((fs->fs_flags & FSF_VALID) == FSF_VALID) {
@@ -548,7 +548,7 @@ nfs_srvr_port(fserver *fs, u_short *port, voidp wchan)
* come back here and new, better things to happen.
*/
fs->fs_flags |= FSF_WANT;
- sched_task(wakeup_task, wchan, (voidp) fs);
+ sched_task(wakeup_task, wchan, (void *)fs);
}
return error;
}
@@ -638,9 +638,9 @@ find_nfs_srvr(mntfs *mf)
switch (hp->h_addrtype) {
case AF_INET:
ip = ALLOC(sockaddr_in);
- bzero((voidp) ip, sizeof(*ip));
+ bzero((void *)ip, sizeof(*ip));
ip->sin_family = AF_INET;
- bcopy((voidp) hp->h_addr, (voidp) &ip->sin_addr, sizeof(ip->sin_addr));
+ bcopy((void *)hp->h_addr, (void *)&ip->sin_addr, sizeof(ip->sin_addr));
ip->sin_port = htons(NFS_PORT);
break;
@@ -673,7 +673,7 @@ find_nfs_srvr(mntfs *mf)
fs->fs_type = "nfs";
fs->fs_pinger = AM_PINGER;
np = ALLOC(nfs_private);
- bzero((voidp) np, sizeof(*np));
+ bzero((void *)np, sizeof(*np));
np->np_mountd_inval = TRUE;
np->np_xid = NPXID_ALLOC();
np->np_error = -1;
@@ -682,7 +682,7 @@ 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 = (voidp) np;
+ fs->fs_private = (void *)np;
fs->fs_prfree = (void (*)()) free;
if (!(fs->fs_flags & FSF_ERROR)) {
diff --git a/usr.sbin/amd/amd/ufs_ops.c b/usr.sbin/amd/amd/ufs_ops.c
index 716fc3325d9..25ff5d467ff 100644
--- a/usr.sbin/amd/amd/ufs_ops.c
+++ b/usr.sbin/amd/amd/ufs_ops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufs_ops.c,v 1.4 2002/08/03 08:29:31 pvalchev Exp $ */
+/* $OpenBSD: ufs_ops.c,v 1.5 2002/08/05 07:24:26 pvalchev Exp $ */
/*
* Copyright (c) 1990 Jan-Simon Pendry
@@ -91,7 +91,7 @@ mount_ufs(char *dir, char *fs_name, char *opts)
*/
MTYPE_TYPE type = MOUNT_TYPE_UFS;
- bzero((voidp) &ufs_args, sizeof(ufs_args)); /* Paranoid */
+ bzero((void *)&ufs_args, sizeof(ufs_args)); /* Paranoid */
/*
* Fill in the mount structure
diff --git a/usr.sbin/amd/amd/util.c b/usr.sbin/amd/amd/util.c
index 2785ec28f73..b2fbf115635 100644
--- a/usr.sbin/amd/amd/util.c
+++ b/usr.sbin/amd/amd/util.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)util.c 8.1 (Berkeley) 6/6/93
- * $Id: util.c,v 1.8 2002/08/03 08:29:31 pvalchev Exp $
+ * $Id: util.c,v 1.9 2002/08/05 07:24:26 pvalchev Exp $
*/
/*
@@ -51,7 +51,7 @@
char *
-strnsave(Const char *str, int len)
+strnsave(const char *str, int len)
{
char *sp = (char *) xmalloc(len+1);
@@ -83,7 +83,7 @@ strealloc(char *p, char *s)
{
int len = strlen(s) + 1;
- p = (char *) xrealloc((voidp) p, len);
+ p = (char *) xrealloc((void *)p, len);
strcpy(p, s);
#ifdef DEBUG_MEM
@@ -144,7 +144,7 @@ strsplit(char *s, int ch, int qc)
* save string in new ivec slot
*/
ivec[ic++] = v;
- ivec = (char **) xrealloc((voidp) ivec, (ic+1)*sizeof(char *));
+ ivec = (char **) xrealloc((void *)ivec, (ic+1)*sizeof(char *));
#ifdef DEBUG
Debug(D_STR)
plog(XLOG_DEBUG, "strsplit saved \"%s\"", v);
@@ -281,7 +281,7 @@ bind_resv_port(int so, u_short *pp)
struct sockaddr_in sin;
int rc;
- bzero((voidp) &sin, sizeof(sin));
+ bzero((void *)&sin, sizeof(sin));
sin.sin_family = AF_INET;
rc = bindresvport(so, &sin);
@@ -467,7 +467,7 @@ auto_fumount(am_node *mp)
* TODO: Need a better strategy for handling errors
*/
static pid_t
-dofork(P_void)
+dofork(void)
{
pid_t pid;
top:
@@ -487,7 +487,7 @@ top:
}
pid_t
-background(P_void)
+background(void)
{
pid_t pid = dofork();
if (pid == 0) {
diff --git a/usr.sbin/amd/amd/xutil.c b/usr.sbin/amd/amd/xutil.c
index 0a5befd34de..fb37d4474ff 100644
--- a/usr.sbin/amd/amd/xutil.c
+++ b/usr.sbin/amd/amd/xutil.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)xutil.c 8.1 (Berkeley) 6/6/93
- * $Id: xutil.c,v 1.8 2002/08/03 08:29:31 pvalchev Exp $
+ * $Id: xutil.c,v 1.9 2002/08/05 07:24:26 pvalchev Exp $
*/
#include "config.h"
@@ -78,10 +78,10 @@ struct opt_tab xlog_opt[] = {
{ 0, 0 }
};
-voidp
+void *
xmalloc(int len)
{
- voidp p;
+ void *p;
int retries = 600;
/*
@@ -91,7 +91,7 @@ xmalloc(int len)
len = 1;
do {
- p = (voidp) malloc((unsigned) len);
+ p = (void *)malloc((unsigned) len);
if (p) {
#if defined(DEBUG) && defined(DEBUG_MEM)
Debug(D_MEM) plog(XLOG_DEBUG, "Allocated size %d; block %#x", len, p);
@@ -112,8 +112,8 @@ xmalloc(int len)
return 0;
}
-voidp
-xrealloc(voidp ptr, int len)
+void *
+xrealloc(void *ptr, int len)
{
#if defined(DEBUG) && defined(DEBUG_MEM)
Debug(D_MEM) plog(XLOG_DEBUG, "Reallocated size %d; block %#x", len, ptr);
@@ -123,9 +123,9 @@ xrealloc(voidp ptr, int len)
len = 1;
if (ptr)
- ptr = (voidp) realloc(ptr, (unsigned) len);
+ ptr = (void *)realloc(ptr, (unsigned) len);
else
- ptr = (voidp) xmalloc((unsigned) len);
+ ptr = (void *)xmalloc((unsigned) len);
if (!ptr) {
plog(XLOG_FATAL, "Out of memory in realloc");
@@ -136,7 +136,7 @@ xrealloc(voidp ptr, int len)
}
#if defined(DEBUG) && defined(DEBUG_MEM)
-xfree(char *f, int l, voidp p)
+xfree(char *f, int l, void *p)
{
Debug(D_MEM) plog(XLOG_DEBUG, "Free in %s:%d: block %#x", f, l, p);
#undef free
@@ -148,7 +148,7 @@ static int mem_bytes;
static int orig_mem_bytes;
static void
-checkup_mem(P_void)
+checkup_mem(void)
{
extern struct mallinfo __mallinfo;
if (mem_bytes != __mallinfo.uordbytes) {
@@ -471,7 +471,7 @@ time_t clock_valid = 0;
time_t xclock_valid = 0;
#ifndef clocktime
time_t
-clocktime(P_void)
+clocktime(void)
{
time_t now = time(&clock_valid);
if (xclock_valid > now) {
diff --git a/usr.sbin/amd/amq/amq.c b/usr.sbin/amd/amq/amq.c
index 7b973e2185e..320f02ec48a 100644
--- a/usr.sbin/amd/amq/amq.c
+++ b/usr.sbin/amd/amq/amq.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)amq.c 8.1 (Berkeley) 6/7/93
- * $Id: amq.c,v 1.7 2002/08/03 21:49:24 deraadt Exp $
+ * $Id: amq.c,v 1.8 2002/08/05 07:24:26 pvalchev Exp $
*/
/*
@@ -52,7 +52,7 @@ char copyright[] = "\
#endif /* not lint */
#ifndef lint
-static char rcsid[] = "$Id: amq.c,v 1.7 2002/08/03 21:49:24 deraadt Exp $";
+static char rcsid[] = "$Id: amq.c,v 1.8 2002/08/05 07:24:26 pvalchev Exp $";
static char sccsid[] = "@(#)amq.c 8.1 (Berkeley) 6/7/93";
#endif /* not lint */
@@ -374,7 +374,7 @@ Usage: %s [-h host] [[-f] [-m] [-v] [-s]] | [[-u] directory ...]] |\n\
bzero(&server_addr, sizeof server_addr);
server_addr.sin_family = AF_INET;
if (hp) {
- bcopy((voidp) hp->h_addr, (voidp) &server_addr.sin_addr,
+ bcopy((void *)hp->h_addr, (void *)&server_addr.sin_addr,
sizeof(server_addr.sin_addr));
} else {
/* fake "localhost" */
@@ -499,7 +499,7 @@ Usage: %s [-h host] [[-f] [-m] [-v] [-s]] | [[-u] directory ...]] |\n\
* Get Version
*/
if (getvers_flag) {
- amq_string *spp = amqproc_getvers_1((voidp) 0, clnt);
+ amq_string *spp = amqproc_getvers_1((void *)0, clnt);
if (spp && *spp) {
printf("%s.\n", *spp);
free(*spp);
@@ -548,7 +548,7 @@ Usage: %s [-h host] [[-f] [-m] [-v] [-s]] | [[-u] directory ...]] |\n\
} else if (unmount_flag) {
goto show_usage;
} else if (stats_flag) {
- amq_mount_stats *ms = amqproc_stats_1((voidp) 0, clnt);
+ amq_mount_stats *ms = amqproc_stats_1((void *)0, clnt);
if (ms) {
show_ms(ms);
} else {
@@ -557,7 +557,7 @@ Usage: %s [-h host] [[-f] [-m] [-v] [-s]] | [[-u] directory ...]] |\n\
errs = 1;
}
} else if (!nodefault) {
- amq_mount_tree_list *mlp = amqproc_export_1((voidp) 0, clnt);
+ amq_mount_tree_list *mlp = amqproc_export_1((void *)0, clnt);
if (mlp) {
enum show_opt e = Calc;
int mwid = 0, dwid = 0, pwid = 0;
@@ -634,7 +634,7 @@ int ty;
#ifdef DEBUG
xfree(f, l, p)
char *f, *l;
-voidp p;
+void *p;
{
free(p);
}
diff --git a/usr.sbin/amd/config/mount_aix.c b/usr.sbin/amd/config/mount_aix.c
index f6e80944d2c..a8ba4f03196 100644
--- a/usr.sbin/amd/config/mount_aix.c
+++ b/usr.sbin/amd/config/mount_aix.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)mount_aix.c 8.1 (Berkeley) 6/6/93
- * $Id: mount_aix.c,v 1.1 1995/10/18 08:47:14 deraadt Exp $
+ * $Id: mount_aix.c,v 1.2 2002/08/05 07:24:26 pvalchev Exp $
*/
@@ -58,7 +58,7 @@ int info_size;
char *args;
{
struct vmount *vp = (struct vmount *) p;
- bzero((voidp) vp, sizeof(*vp));
+ bzero((void *)vp, sizeof(*vp));
/*
* Fill in standard fields
*/
@@ -131,7 +131,7 @@ char *args;
size = aix3_mkvp(buf, type, flags, rfs, dir, host, data, sizeof(struct nfs_args), args);
if (free_rfs)
- free((voidp) rfs);
+ free((void *)rfs);
free(host);
} break;
diff --git a/usr.sbin/amd/config/mtab_file.c b/usr.sbin/amd/config/mtab_file.c
index 31906aba9fc..066089d5787 100644
--- a/usr.sbin/amd/config/mtab_file.c
+++ b/usr.sbin/amd/config/mtab_file.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)mtab_file.c 8.1 (Berkeley) 6/6/93
- * $Id: mtab_file.c,v 1.2 2002/06/10 21:07:14 itojun Exp $
+ * $Id: mtab_file.c,v 1.3 2002/08/05 07:24:26 pvalchev Exp $
*/
#include "am.h"
@@ -229,7 +229,7 @@ eacces:
tv.tv_sec = 0;
tv.tv_usec = (mypid & 0x07) << 17;
if (tv.tv_usec)
- if (select(0, (voidp) 0, (voidp) 0, (voidp) 0, &tv) < 0)
+ if (select(0, (void *)0, (void *)0, (void *)0, &tv) < 0)
plog(XLOG_WARNING, "mtab nap failed: %m");
goto again;
diff --git a/usr.sbin/amd/config/os-bsd44.h b/usr.sbin/amd/config/os-bsd44.h
index 0a6e8a8da20..d535db73e6c 100644
--- a/usr.sbin/amd/config/os-bsd44.h
+++ b/usr.sbin/amd/config/os-bsd44.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: os-bsd44.h,v 1.6 1996/11/29 22:59:42 imp Exp $ */
+/* $OpenBSD: os-bsd44.h,v 1.7 2002/08/05 07:24:26 pvalchev Exp $ */
/*
* Copyright (c) 1990 Jan-Simon Pendry
@@ -43,11 +43,6 @@
*/
/*
- * Does the compiler grok void *
- */
-#define VOIDP
-
-/*
* Which version of the Sun RPC library we are using
* This is the implementation release number, not
* the protocol revision number.
diff --git a/usr.sbin/amd/include/am.h b/usr.sbin/amd/include/am.h
index c6ab605ae9a..5698aed7f71 100644
--- a/usr.sbin/amd/include/am.h
+++ b/usr.sbin/amd/include/am.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: am.h,v 1.7 2002/08/03 08:29:32 pvalchev Exp $ */
+/* $OpenBSD: am.h,v 1.8 2002/08/05 07:24:26 pvalchev Exp $ */
/*
* Copyright (c) 1990 Jan-Simon Pendry
@@ -175,10 +175,10 @@ extern char *wire; /* Name of primary connected network */
#define NEXP_AP (254)
#define NEXP_AP_MARGIN (128)
-typedef int (*task_fun)(voidp);
-typedef void (*cb_fun)(int, int, voidp);
-typedef void (*fwd_fun)(voidp, int, struct sockaddr_in *,
- struct sockaddr_in *, voidp, int);
+typedef int (*task_fun)(void *);
+typedef void (*cb_fun)(int, int, void *);
+typedef void (*fwd_fun)(void *, int, struct sockaddr_in *,
+ struct sockaddr_in *, void *, int);
/*
* String comparison macros
@@ -223,26 +223,26 @@ struct fhstatus;
*/
extern void am_mounted(am_node *);
extern void am_unmounted(am_node *);
-extern pid_t background(P_void);
+extern pid_t background(void);
extern int bind_resv_port(int, unsigned short *);
extern int compute_mount_flags(struct mntent *);
-extern int softclock(P_void);
+extern int softclock(void);
#ifdef DEBUG
extern int debug_option(char *);
#endif /* DEBUG */
extern void deslashify(char *);
extern void discard_mntlist(mntlist *mp);
-/*extern void domain_strip(char*, char *);*/
+/*extern void domain_strip(char *, char *);*/
extern mntfs *dup_mntfs(mntfs *);
extern fserver *dup_srvr(fserver*);
extern int eval_fs_opts(am_opts *, char *, char *, char *, char *, char *);
extern char *expand_key(char *);
-extern am_node *exported_ap_alloc(P_void);
+extern am_node *exported_ap_alloc(void);
extern am_node *find_ap(char *);
extern am_node *find_mf(mntfs *);
extern mntfs *find_mntfs(am_ops *, am_opts *, char *, char *, char *,
char *, char *);
-extern void flush_mntfs(P_void);
+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 *);
@@ -251,10 +251,10 @@ extern void free_opts(am_opts *);
extern void free_map(am_node *);
extern void free_mntlist(mntlist *);
extern void free_srvr(fserver *);
-extern int fwd_init(P_void);
-extern int fwd_packet(int, voidp, int, struct sockaddr_in *,
- struct sockaddr_in *, voidp, fwd_fun);
-extern void fwd_reply(P_void);
+extern int fwd_init(void);
+extern int fwd_packet(int, void *, int, struct sockaddr_in *,
+ struct sockaddr_in *, void *, fwd_fun);
+extern void fwd_reply(void);
extern void get_args(int, char *[]);
extern char *getwire(void);
#ifdef NEED_MNTOPT_PARSER
@@ -268,71 +268,71 @@ extern void insert_am(am_node *, am_node *);
extern void ins_que(qelem *, qelem *);
extern int islocalnet(u_int32_t);
extern int make_nfs_auth(void);
-extern void make_root_node(P_void);
+extern void make_root_node(void);
extern int make_rpc_packet(char *, int, u_long, struct rpc_msg *,
- voidp, xdrproc_t, AUTH *);
+ void *, xdrproc_t, AUTH *);
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 int mapc_keyiter(mnt_map*, void (*)(char *,voidp), voidp);
+extern int mapc_keyiter(mnt_map*, void (*)(char *,void *), void *);
extern int mapc_search(mnt_map *, char *, char **);
-extern void mapc_reload(P_void);
+extern void mapc_reload(void);
extern void mapc_showtypes(FILE *);
extern void mf_mounted(mntfs *mf);
extern int mkdirs(char *, int);
extern void mk_fattr(am_node *, int);
extern void mnt_free(struct mntent *);
-extern int mount_auto_node(char *, voidp);
+extern int mount_auto_node(char *, void *);
extern int mount_automounter(pid_t);
-extern int mount_exported(P_void);
+extern int mount_exported(void);
extern int mount_fs(struct mntent *, int, caddr_t, int, MTYPE_TYPE);
extern int mount_nfs_fh(struct fhstatus *, char *, char *, char *, mntfs *);
extern int mount_node(am_node *);
-extern mntfs *new_mntfs(P_void);
+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 *, voidp);
+extern int nfs_srvr_port(fserver *, u_short *, void *);
extern void normalize_slash(char *);
extern void ops_showfstypes(FILE *);
-extern int pickup_rpc_reply(voidp, int, voidp, xdrproc_t);
+extern int pickup_rpc_reply(void *, int, void *, xdrproc_t);
extern mntlist *read_mtab(char *);
extern mntfs *realloc_mntfs(mntfs *, am_ops *, am_opts *, char *,
char *, char *, char *, char *);
extern void rem_que(qelem *);
-extern void reschedule_timeout_mp(P_void);
-extern void restart(P_void);
+extern void reschedule_timeout_mp(void);
+extern void restart(void);
#ifdef UPDATE_MTAB
extern void rewrite_mtab(mntlist *);
#endif /* UPDATE_MTAB */
extern void rmdirs(char *);
extern am_node *root_ap(char *, int);
-extern int root_keyiter(void (*)(char *,voidp), voidp);
+extern int root_keyiter(void (*)(char *,void *), void *);
extern void root_newmap(char *, char *, char *);
extern void rpc_msg_init(struct rpc_msg *, u_long, u_long, u_long);
-extern void run_task(task_fun, voidp, cb_fun, voidp);
-extern void sched_task(cb_fun, voidp, voidp);
-extern void show_rcs_info(Const char *, char *);
+extern void run_task(task_fun, void *, cb_fun, void *);
+extern void sched_task(cb_fun, void *, void *);
+extern void show_rcs_info(const char *, char *);
extern void sigchld(int);
extern void srvrlog(fserver *, char *);
extern char *str3cat(char *, char *, char *, char *);
-extern char *strnsave(Const char *, int);
+extern char *strnsave(const char *, int);
extern char *strealloc(char *, char *);
extern char **strsplit(char *, int, int);
extern int switch_option(char *);
extern int switch_to_logfile(char *);
-extern void do_task_notify(P_void);
-extern int timeout(unsigned int, void (*fn)(), voidp);
-extern void timeout_mp(P_void);
-extern void umount_exported(P_void);
+extern void do_task_notify(void);
+extern int timeout(unsigned int, void (*fn)(), void *);
+extern void timeout_mp(void);
+extern void umount_exported(void);
extern int umount_fs(char *);
/*extern int unmount_node(am_node*);
-extern int unmount_node_wrap(voidp);*/
-extern void unregister_amq(P_void);
+extern int unmount_node_wrap(void *);*/
+extern void unregister_amq(void);
extern void untimeout(int);
extern int valid_key(char *);
-extern void wakeup(voidp);
-extern void wakeup_task(int, int, voidp);
+extern void wakeup(void *);
+extern void wakeup_task(int, int, void *);
extern void wakeup_srvr(fserver *);
extern void write_mntent(struct mntent *);
#ifdef UPDATE_MTAB
@@ -482,7 +482,7 @@ struct fserver {
int fs_pinger; /* Ping (keepalive) interval */
int fs_flags; /* Flags */
char *fs_type; /* File server type */
- voidp fs_private; /* Private data */
+ void *fs_private; /* Private data */
void (*fs_prfree)(); /* Free private data */
};
#define FSF_VALID 0x0001 /* Valid information available */
@@ -511,7 +511,7 @@ struct mntfs {
int mf_refc; /* Number of references to this node */
int mf_cid; /* Callout id */
void (*mf_prfree)(); /* Free private space */
- voidp mf_private; /* Private - per-fs data */
+ void *mf_private; /* Private - per-fs data */
};
#define MFF_MOUNTED 0x0001 /* Node is mounted */
diff --git a/usr.sbin/amd/include/config.h b/usr.sbin/amd/include/config.h
index 7ae834f2731..b1090da472b 100644
--- a/usr.sbin/amd/include/config.h
+++ b/usr.sbin/amd/include/config.h
@@ -36,20 +36,9 @@
* SUCH DAMAGE.
*
* from: @(#)config.h 8.1 (Berkeley) 6/6/93
- * $Id: config.h,v 1.3 2002/08/03 08:29:32 pvalchev Exp $
+ * $Id: config.h,v 1.4 2002/08/05 07:24:26 pvalchev Exp $
*/
-/*
- * Get this in now so that OS_HDR can use it
- */
-#ifdef __STDC__
-#define P_void void
-#define Const const
-#else
-#define P_void /* as nothing */
-#define Const /* as nothing */
-#endif /* __STDC__ */
-
#ifdef __GNUC__
#define INLINE /* __inline */
#else
@@ -62,12 +51,6 @@
#include "os-defaults.h"
#include OS_HDR
-#ifdef VOIDP
-typedef void *voidp;
-#else
-typedef char *voidp;
-#endif /* VOIDP */
-
#include <stdio.h>
#include <sys/types.h>
#include <sys/errno.h>
@@ -130,5 +113,5 @@ extern void going_down(int);
#endif /* DEBUG */
extern void plog(int, char *, ...);
extern void show_opts(int ch, struct opt_tab *);
-extern voidp xmalloc(int);
-extern voidp xrealloc(voidp, int);
+extern void *xmalloc(int);
+extern void *xrealloc(void *, int);
diff --git a/usr.sbin/amd/mk-amd-map/mk-amd-map.c b/usr.sbin/amd/mk-amd-map/mk-amd-map.c
index edd9d521955..6241d8e8f9d 100644
--- a/usr.sbin/amd/mk-amd-map/mk-amd-map.c
+++ b/usr.sbin/amd/mk-amd-map/mk-amd-map.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)mk-amd-map.c 8.1 (Berkeley) 6/28/93
- * $Id: mk-amd-map.c,v 1.5 2002/07/18 10:10:56 pvalchev Exp $
+ * $Id: mk-amd-map.c,v 1.6 2002/08/05 07:24:26 pvalchev Exp $
*/
/*
@@ -52,7 +52,7 @@ char copyright[] = "\
#endif /* not lint */
#ifndef lint
-static char rcsid[] = "$Id: mk-amd-map.c,v 1.5 2002/07/18 10:10:56 pvalchev Exp $";
+static char rcsid[] = "$Id: mk-amd-map.c,v 1.6 2002/08/05 07:24:26 pvalchev Exp $";
static char sccsid[] = "@(#)mk-amd-map.c 8.1 (Berkeley) 6/28/93";
#endif /* not lint */
@@ -74,7 +74,7 @@ static char sccsid[] = "@(#)mk-amd-map.c 8.1 (Berkeley) 6/28/93";
#define create_database(name) dbm_open(name, O_RDWR|O_CREAT, 0644)
static int
-store_data(voidp db, char *k, char *v)
+store_data(void *db, char *k, char *v)
{
datum key, val;
@@ -125,7 +125,7 @@ read_line(char *buf, int size, FILE *fp)
* Read through a map
*/
static int
-read_file(FILE *fp, char *map, voidp db)
+read_file(FILE *fp, char *map, void *db)
{
char key_val[2048];
int chuck = 0;
diff --git a/usr.sbin/amd/rpcx/amq.h b/usr.sbin/amd/rpcx/amq.h
index 77d798456e4..b1a44791f75 100644
--- a/usr.sbin/amd/rpcx/amq.h
+++ b/usr.sbin/amd/rpcx/amq.h
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)amq.h 8.1 (Berkeley) 6/6/93
- * $Id: amq.h,v 1.2 1997/01/31 14:42:22 graichen Exp $
+ * $Id: amq.h,v 1.3 2002/08/05 07:24:26 pvalchev Exp $
*
*/
@@ -132,11 +132,11 @@ bool_t xdr_amq_setopt();
#define AMQ_PROGRAM ((u_long)300019)
#define AMQ_VERSION ((u_long)1)
#define AMQPROC_NULL ((u_long)0)
-extern voidp amqproc_null_1();
+extern void *amqproc_null_1();
#define AMQPROC_MNTTREE ((u_long)1)
extern amq_mount_tree_p *amqproc_mnttree_1();
#define AMQPROC_UMNT ((u_long)2)
-extern voidp amqproc_umnt_1();
+extern void *amqproc_umnt_1();
#define AMQPROC_STATS ((u_long)3)
extern amq_mount_stats *amqproc_stats_1();
#define AMQPROC_EXPORT ((u_long)4)
diff --git a/usr.sbin/amd/rpcx/amq_clnt.c b/usr.sbin/amd/rpcx/amq_clnt.c
index 2e20f642d30..9b0746e582d 100644
--- a/usr.sbin/amd/rpcx/amq_clnt.c
+++ b/usr.sbin/amd/rpcx/amq_clnt.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)amq_clnt.c 8.1 (Berkeley) 6/6/93
- * $Id: amq_clnt.c,v 1.2 2002/08/03 08:29:32 pvalchev Exp $
+ * $Id: amq_clnt.c,v 1.3 2002/08/05 07:24:26 pvalchev Exp $
*
*/
@@ -45,8 +45,8 @@
static struct timeval TIMEOUT = { ALLOWED_MOUNT_TIME, 0 };
-voidp
-amqproc_null_1(voidp argp, CLIENT *clnt)
+void *
+amqproc_null_1(void *argp, CLIENT *clnt)
{
static char res;
@@ -54,7 +54,7 @@ amqproc_null_1(voidp argp, CLIENT *clnt)
if (clnt_call(clnt, AMQPROC_NULL, xdr_void, argp, xdr_void, &res, TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
- return ((voidp)&res);
+ return ((void *)&res);
}
@@ -71,7 +71,7 @@ amqproc_mnttree_1(amq_string *argp, CLIENT *clnt)
}
-voidp
+void *
amqproc_umnt_1(amq_string *argp, CLIENT *clnt)
{
static char res;
@@ -80,12 +80,12 @@ amqproc_umnt_1(amq_string *argp, CLIENT *clnt)
if (clnt_call(clnt, AMQPROC_UMNT, xdr_amq_string, argp, xdr_void, &res, TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
- return ((voidp)&res);
+ return ((void *)&res);
}
amq_mount_stats *
-amqproc_stats_1(voidp argp, CLIENT *clnt)
+amqproc_stats_1(void *argp, CLIENT *clnt)
{
static amq_mount_stats res;
@@ -98,7 +98,7 @@ amqproc_stats_1(voidp argp, CLIENT *clnt)
amq_mount_tree_list *
-amqproc_export_1(voidp argp, CLIENT *clnt)
+amqproc_export_1(void *argp, CLIENT *clnt)
{
static amq_mount_tree_list res;
@@ -123,7 +123,7 @@ amqproc_setopt_1(amq_setopt *argp, CLIENT *clnt)
amq_mount_info_list *
-amqproc_getmntfs_1(voidp argp, CLIENT *clnt)
+amqproc_getmntfs_1(void *argp, CLIENT *clnt)
{
static amq_mount_info_list res;
@@ -136,7 +136,7 @@ amqproc_getmntfs_1(voidp argp, CLIENT *clnt)
int *
-amqproc_mount_1(voidp argp, CLIENT *clnt)
+amqproc_mount_1(void *argp, CLIENT *clnt)
{
static int res;
@@ -149,7 +149,7 @@ amqproc_mount_1(voidp argp, CLIENT *clnt)
amq_string *
-amqproc_getvers_1(voidp argp, CLIENT *clnt)
+amqproc_getvers_1(void *argp, CLIENT *clnt)
{
static amq_string res;
diff --git a/usr.sbin/amd/rpcx/mount.h b/usr.sbin/amd/rpcx/mount.h
index 8f8d2b95c35..e71925ea083 100644
--- a/usr.sbin/amd/rpcx/mount.h
+++ b/usr.sbin/amd/rpcx/mount.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mount.h,v 1.4 2002/08/03 08:29:32 pvalchev Exp $ */
+/* $OpenBSD: mount.h,v 1.5 2002/08/05 07:24:26 pvalchev Exp $ */
/*
* Copyright (c) 1990 Jan-Simon Pendry
@@ -117,15 +117,15 @@ bool_t xdr_exportnode();
#define MOUNTPROG ((u_long)100005)
#define MOUNTVERS ((u_long)1)
#define MOUNTPROC_NULL ((u_long)0)
-extern voidp mountproc_null_1();
+extern void *mountproc_null_1();
#define MOUNTPROC_MNT ((u_long)1)
extern fhstatus *mountproc_mnt_1();
#define MOUNTPROC_DUMP ((u_long)2)
extern mountlist *mountproc_dump_1();
#define MOUNTPROC_UMNT ((u_long)3)
-extern voidp mountproc_umnt_1();
+extern void *mountproc_umnt_1();
#define MOUNTPROC_UMNTALL ((u_long)4)
-extern voidp mountproc_umntall_1();
+extern void *mountproc_umntall_1();
#define MOUNTPROC_EXPORT ((u_long)5)
extern exports *mountproc_export_1();
#define MOUNTPROC_EXPORTALL ((u_long)6)
diff --git a/usr.sbin/amd/rpcx/nfs_prot.h b/usr.sbin/amd/rpcx/nfs_prot.h
index 21c6a389cd5..2fba2e50e72 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.2 1996/03/25 15:54:58 niklas Exp $ */
+/* $OpenBSD: nfs_prot.h,v 1.3 2002/08/05 07:24:26 pvalchev Exp $ */
/*
* Copyright (c) 1990 Jan-Simon Pendry
@@ -404,14 +404,14 @@ bool_t xdr_statfsres();
#undef NFSPROC_STATFS
#define NFSPROC_STATFS ((u_long)17)
-extern voidp nfsproc_null_2();
+extern void *nfsproc_null_2();
extern attrstat *nfsproc_getattr_2();
extern attrstat *nfsproc_setattr_2();
-extern voidp nfsproc_root_2();
+extern void *nfsproc_root_2();
extern diropres *nfsproc_lookup_2();
extern readlinkres *nfsproc_readlink_2();
extern readres *nfsproc_read_2();
-extern voidp nfsproc_writecache_2();
+extern void *nfsproc_writecache_2();
extern attrstat *nfsproc_write_2();
extern diropres *nfsproc_create_2();
extern nfsstat *nfsproc_remove_2();