diff options
author | jdp <jdp@FreeBSD.org> | 1998-10-24 02:01:30 +0000 |
---|---|---|
committer | jdp <jdp@FreeBSD.org> | 1998-10-24 02:01:30 +0000 |
commit | 685952292c8a156ebbefae2002eb214d0ef2ac1c (patch) | |
tree | d875b23695325cb36ad751a11b868ef7c49b3f77 /usr.bin | |
parent | cb6bccf1dc60c955024134903445d05945bc35ed (diff) | |
download | FreeBSD-src-685952292c8a156ebbefae2002eb214d0ef2ac1c.zip FreeBSD-src-685952292c8a156ebbefae2002eb214d0ef2ac1c.tar.gz |
When invoked as "objformat" to print out the current object format,
produce an error message if any arguments are given on the command
line.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/objformat/objformat.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); } |