diff options
Diffstat (limited to 'usr.sbin/amd/amq/amq.c')
-rw-r--r-- | usr.sbin/amd/amq/amq.c | 48 |
1 files changed, 12 insertions, 36 deletions
diff --git a/usr.sbin/amd/amq/amq.c b/usr.sbin/amd/amq/amq.c index a28a23dc0b2..640c617a523 100644 --- a/usr.sbin/amd/amq/amq.c +++ b/usr.sbin/amd/amq/amq.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)amq.c 8.1 (Berkeley) 6/7/93 - * $Id: amq.c,v 1.17 2015/01/21 08:24:41 guenther Exp $ + * $Id: amq.c,v 1.18 2015/01/21 09:50:25 guenther Exp $ */ /* @@ -55,7 +55,6 @@ static int stats_flag; static int getvers_flag; static char *debug_opts; static char *logfile; -static char *mount_map; static char *xlog_optstr; static char localhost[] = "localhost"; static char *def_server = localhost; @@ -231,7 +230,7 @@ main(int argc, char *argv[]) /* * Parse arguments */ - while ((opt_ch = getopt(argc, argv, "fh:l:msuvx:D:M:")) != -1) + while ((opt_ch = getopt(argc, argv, "fh:l:msuvx:D:")) != -1) switch (opt_ch) { case 'f': flush_flag = 1; @@ -277,11 +276,6 @@ main(int argc, char *argv[]) nodefault = 1; break; - case 'M': - mount_map = optarg; - nodefault = 1; - break; - default: errs = 1; break; @@ -343,7 +337,7 @@ show_usage: amq_setopt opt; opt.as_opt = AMOPT_DEBUG; opt.as_str = debug_opts; - rc = amqproc_setopt_1(&opt, clnt); + rc = amqproc_setopt_57(&opt, clnt); if (rc && *rc < 0) { fprintf(stderr, "%s: daemon not compiled for debug", __progname); @@ -364,7 +358,7 @@ show_usage: amq_setopt opt; opt.as_opt = AMOPT_XLOG; opt.as_str = xlog_optstr; - rc = amqproc_setopt_1(&opt, clnt); + rc = amqproc_setopt_57(&opt, clnt); if (!rc || *rc) { fprintf(stderr, "%s: setting log level to \"%s\" failed\n", __progname, xlog_optstr); @@ -380,7 +374,7 @@ show_usage: amq_setopt opt; opt.as_opt = AMOPT_LOGFILE; opt.as_str = logfile; - rc = amqproc_setopt_1(&opt, clnt); + rc = amqproc_setopt_57(&opt, clnt); if (!rc || *rc) { fprintf(stderr, "%s: setting logfile to \"%s\" failed\n", __progname, logfile); @@ -396,7 +390,7 @@ show_usage: amq_setopt opt; opt.as_opt = AMOPT_FLUSHMAPC; opt.as_str = ""; - rc = amqproc_setopt_1(&opt, clnt); + rc = amqproc_setopt_57(&opt, clnt); if (!rc || *rc) { fprintf(stderr, "%s: amd on %s cannot flush the map cache\n", @@ -410,7 +404,7 @@ show_usage: */ if (minfo_flag) { int dummy; - amq_mount_info_list *ml = amqproc_getmntfs_1(&dummy, clnt); + amq_mount_info_list *ml = amqproc_getmntfs_57(&dummy, clnt); if (ml) { int mwid = 0, dwid = 0, twid = 0; show_mi(ml, Calc, &mwid, &dwid, &twid); @@ -423,28 +417,10 @@ show_usage: } /* - * Mount map - */ - if (mount_map) { - int *rc; - do { - rc = amqproc_mount_1(&mount_map, clnt); - } while (rc && *rc < 0); - if (!rc || *rc > 0) { - if (rc) - errno = *rc; - else - errno = ETIMEDOUT; - fprintf(stderr, "%s: could not start new ", __progname); - perror("autmount point"); - } - } - - /* * Get Version */ if (getvers_flag) { - amq_string *spp = amqproc_getvers_1(NULL, clnt); + amq_string *spp = amqproc_getvers_57(NULL, clnt); if (spp && *spp) { printf("%s.\n", *spp); free(*spp); @@ -465,12 +441,12 @@ show_usage: /* * Unmount request */ - amqproc_umnt_1(&fs, clnt); + amqproc_umnt_57(&fs, clnt); } else { /* * Stats request */ - amq_mount_tree_p *mtp = amqproc_mnttree_1(&fs, clnt); + amq_mount_tree_p *mtp = amqproc_mnttree_57(&fs, clnt); if (mtp) { amq_mount_tree *mt = *mtp; if (mt) { @@ -502,7 +478,7 @@ show_usage: } else if (unmount_flag) { goto show_usage; } else if (stats_flag) { - amq_mount_stats *ms = amqproc_stats_1(NULL, clnt); + amq_mount_stats *ms = amqproc_stats_57(NULL, clnt); if (ms) { show_ms(ms); } else { @@ -511,7 +487,7 @@ show_usage: errs = 1; } } else if (!nodefault) { - amq_mount_tree_list *mlp = amqproc_export_1(NULL, clnt); + amq_mount_tree_list *mlp = amqproc_export_57(NULL, clnt); if (mlp) { enum show_opt e = Calc; int mwid = 0, dwid = 0, pwid = 0; |