From 685952292c8a156ebbefae2002eb214d0ef2ac1c Mon Sep 17 00:00:00 2001 From: jdp Date: Sat, 24 Oct 1998 02:01:30 +0000 Subject: When invoked as "objformat" to print out the current object format, produce an error message if any arguments are given on the command line. --- usr.bin/objformat/objformat.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'usr.bin/objformat/objformat.c') diff --git a/usr.bin/objformat/objformat.c b/usr.bin/objformat/objformat.c index 32ed385..8d75f5e 100644 --- a/usr.bin/objformat/objformat.c +++ b/usr.bin/objformat/objformat.c @@ -51,6 +51,10 @@ main(int argc, char **argv) cmd = argv[0]; if (strcmp(cmd, "objformat") == 0) { + if (argc != 1) { + fprintf(stderr, "Usage: objformat\n"); + exit(1); + } printf("%s\n", objformat); exit(0); } -- cgit v1.1