From c6e23310826f8815f9a35abdb657254ef4e47d66 Mon Sep 17 00:00:00 2001 From: charnier Date: Mon, 5 Jan 1998 07:23:02 +0000 Subject: Add rcsid. Remove uneeded #include. Use fprintf() in usage() instead of err(3) to make it print: usage: progname ... --- sbin/spppcontrol/spppcontrol.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'sbin/spppcontrol') diff --git a/sbin/spppcontrol/spppcontrol.c b/sbin/spppcontrol/spppcontrol.c index f961ae6..9970988 100644 --- a/sbin/spppcontrol/spppcontrol.c +++ b/sbin/spppcontrol/spppcontrol.c @@ -22,10 +22,13 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ +#ifndef lint +static const char rcsid[] = + "$Id$"; +#endif /* not lint */ + #include #include #include @@ -37,7 +40,6 @@ #include #include -#include #include #include #include @@ -45,7 +47,7 @@ #include #include -void usage(void); +static void usage(void); void print_vals(const char *ifname, struct spppreq *sp); const char *phase_name(enum ppp_phase phase); const char *proto_name(u_short proto); @@ -178,12 +180,13 @@ main(int argc, char **argv) return 0; } -void +static void usage(void) { - errx(EX_USAGE, - "usage: [-v] ifname [{my|his}auth{proto|name|secret}=..." - "|callin|always]"); + fprintf(stderr, "%s\n%s\n", + "usage: spppcontrol [-v] ifname [{my|his}auth{proto|name|secret}=...]", + " spppcontrol [-v] ifname callin|always"); + exit(EX_USAGE); } void -- cgit v1.1