summaryrefslogtreecommitdiffstats
path: root/sbin/dmesg
diff options
context:
space:
mode:
authorschweikh <schweikh@FreeBSD.org>2004-10-13 20:33:18 +0000
committerschweikh <schweikh@FreeBSD.org>2004-10-13 20:33:18 +0000
commitb218555e7bd8f53500e2301125aa5600089d7575 (patch)
tree0b28a82a54458a33c6e2d5d7b7807459ff86f151 /sbin/dmesg
parent03ca03ca8dc4a725de7a0a244ad98af1777a9598 (diff)
downloadFreeBSD-src-b218555e7bd8f53500e2301125aa5600089d7575.zip
FreeBSD-src-b218555e7bd8f53500e2301125aa5600089d7575.tar.gz
Print a usage message if a non-option is specified.
MFC after: 3 weeks
Diffstat (limited to 'sbin/dmesg')
-rw-r--r--sbin/dmesg/dmesg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/dmesg/dmesg.c b/sbin/dmesg/dmesg.c
index d24addd..c0f4b5a 100644
--- a/sbin/dmesg/dmesg.c
+++ b/sbin/dmesg/dmesg.c
@@ -99,7 +99,8 @@ main(int argc, char *argv[])
usage();
}
argc -= optind;
- argv += optind;
+ if (argc != 0)
+ usage();
if (memf == NULL) {
/*
OpenPOWER on IntegriCloud