summaryrefslogtreecommitdiffstats
path: root/usr.bin/objformat/objformat.c
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1998-10-24 02:01:30 +0000
committerjdp <jdp@FreeBSD.org>1998-10-24 02:01:30 +0000
commit685952292c8a156ebbefae2002eb214d0ef2ac1c (patch)
treed875b23695325cb36ad751a11b868ef7c49b3f77 /usr.bin/objformat/objformat.c
parentcb6bccf1dc60c955024134903445d05945bc35ed (diff)
downloadFreeBSD-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/objformat/objformat.c')
-rw-r--r--usr.bin/objformat/objformat.c4
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);
}
OpenPOWER on IntegriCloud