summaryrefslogtreecommitdiff
path: root/usr.bin/rdist
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2021-06-22 20:19:29 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2021-06-22 20:19:29 +0000
commita57127bb7cd229e9f81d8e0f549dc3a5446e20bc (patch)
treec76f4059bc5fcc7ccaae8f95f946615517f2a324 /usr.bin/rdist
parentf85bf9eefb0db0b9ca0ca55f6c5a0ad03e173a2e (diff)
reduce verbosity in usage and make it match SYNOPSIS;
i reformatted it to match 80w, and removed two functions that had been used to populate usage: getdistoptlist and msgprusage; ok millert
Diffstat (limited to 'usr.bin/rdist')
-rw-r--r--usr.bin/rdist/client.h3
-rw-r--r--usr.bin/rdist/defs.h3
-rw-r--r--usr.bin/rdist/distopt.c23
-rw-r--r--usr.bin/rdist/message.c26
-rw-r--r--usr.bin/rdist/rdist.c22
5 files changed, 12 insertions, 65 deletions
diff --git a/usr.bin/rdist/client.h b/usr.bin/rdist/client.h
index 2242de7f53a..1469092dfa8 100644
--- a/usr.bin/rdist/client.h
+++ b/usr.bin/rdist/client.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: client.h,v 1.3 2017/08/30 07:42:52 otto Exp $ */
+/* $OpenBSD: client.h,v 1.4 2021/06/22 20:19:28 jmc Exp $ */
#ifndef __CLIENT_H__
#define __CLIENT_H__
@@ -161,7 +161,6 @@ int install(char *, char *, int, int , opt_t);
/* distopt.c */
int parsedistopts(char *, opt_t *, int);
-char *getdistoptlist(void);
char *getondistoptlist(opt_t);
/* docmd.c */
diff --git a/usr.bin/rdist/defs.h b/usr.bin/rdist/defs.h
index e63ee3d801c..3b0688e4071 100644
--- a/usr.bin/rdist/defs.h
+++ b/usr.bin/rdist/defs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: defs.h,v 1.38 2018/09/21 19:00:45 millert Exp $ */
+/* $OpenBSD: defs.h,v 1.39 2021/06/22 20:19:28 jmc Exp $ */
#ifndef __DEFS_H__
#define __DEFS_H__
@@ -206,7 +206,6 @@ char *xbasename(char *);
char *searchpath(char *);
/* message.c */
-void msgprusage(void);
void msgprconfig(void);
char *msgparseopts(char *, int);
void checkhostname(void);
diff --git a/usr.bin/rdist/distopt.c b/usr.bin/rdist/distopt.c
index 9604ee83412..3f0b88a240a 100644
--- a/usr.bin/rdist/distopt.c
+++ b/usr.bin/rdist/distopt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: distopt.c,v 1.13 2015/01/20 09:00:16 guenther Exp $ */
+/* $OpenBSD: distopt.c,v 1.14 2021/06/22 20:19:28 jmc Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -134,27 +134,6 @@ parsedistopts(char *str, opt_t *optptr, int doerrs)
}
/*
- * Get a list of the Distfile Option Entries.
- */
-char *
-getdistoptlist(void)
-{
- int i;
- static char buf[1024];
-
- for (i = 0, buf[0] = CNULL; distoptinfo[i].do_name; ++i) {
- if (buf[0] == CNULL)
- (void) strlcpy(buf, distoptinfo[i].do_name, sizeof buf);
- else {
- (void) strlcat(buf, ",", sizeof buf);
- (void) strlcat(buf, distoptinfo[i].do_name, sizeof buf);
- }
- }
-
- return(buf);
-}
-
-/*
* Get a list of the Distfile Option Entries for each enabled
* value in "opts".
*/
diff --git a/usr.bin/rdist/message.c b/usr.bin/rdist/message.c
index eff150374f3..8119141f118 100644
--- a/usr.bin/rdist/message.c
+++ b/usr.bin/rdist/message.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: message.c,v 1.29 2019/06/28 05:35:35 deraadt Exp $ */
+/* $OpenBSD: message.c,v 1.30 2021/06/22 20:19:28 jmc Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -118,30 +118,6 @@ static void _error(const char *);
static void _fatalerr(const char *);
/*
- * Print message logging usage message
- */
-void
-msgprusage(void)
-{
- int i, x;
-
- (void) fprintf(stderr, "\nWhere <msgopt> is of form\n");
- (void) fprintf(stderr,
- "\t<facility1>=<type1>,<type2>,...:<facility2>=<type1>,<type2>...\n");
-
- (void) fprintf(stderr, "Valid <facility> names:");
-
- for (i = 0; msgfacility[i].mf_name; ++i)
- (void) fprintf(stderr, " %s", msgfacility[i].mf_name);
-
- (void) fprintf(stderr, "\nValid <type> names:");
- for (x = 0; msgtypes[x].mt_name; ++x)
- (void) fprintf(stderr, " %s", msgtypes[x].mt_name);
-
- (void) fprintf(stderr, "\n");
-}
-
-/*
* Print enabled message logging info
*/
void
diff --git a/usr.bin/rdist/rdist.c b/usr.bin/rdist/rdist.c
index ffa692b2f82..4003ff6ee16 100644
--- a/usr.bin/rdist/rdist.c
+++ b/usr.bin/rdist/rdist.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rdist.c,v 1.31 2017/07/09 14:04:50 espie Exp $ */
+/* $OpenBSD: rdist.c,v 1.32 2021/06/22 20:19:28 jmc Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -337,19 +337,13 @@ usage(void)
extern char *__progname;
(void) fprintf(stderr,
- "usage: %s [-DFnV] [-A num] [-a num] "
- "[-c mini_distfile]\n"
- "\t[-d var=value] [-f distfile] [-L remote_logopts] "
- "[-l local_logopts]\n"
- "\t[-M maxproc] [-m host] [-o distopts] [-P rsh-path] "
- "[-p rdistd-path]\n"
- "\t[-t timeout] [name ...]\n", __progname);
-
-
- (void) fprintf(stderr, "\nThe values for <distopts> are:\n\t%s\n",
- getdistoptlist());
-
- msgprusage();
+ "usage: %s [-DFnV] [-A num] [-a num] [-c mini_distfile]"
+ " [-d var=value]\n"
+ "\t[-f distfile] [-L remote_logopts] [-l local_logopts]"
+ " [-M maxproc]\n"
+ "\t[-m host] [-o distopts] [-P rsh-path] [-p rdistd-path]"
+ " [-t timeout]\n"
+ "\t[name ...]\n", __progname);
exit(1);
}