aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2000-03-20 16:49:04 +0000
committerBill Nottingham <notting@redhat.com>2000-03-20 16:49:04 +0000
commitd9f8d5b0dd47ee745c6a1b674939a704af74b1ff (patch)
treeeb3af7c76402c9b7ef336435012c0b1e3aaed0bc /src
parent25811b30022c7420ea538bc46a72b83673ec6c00 (diff)
downloadinitscripts-d9f8d5b0dd47ee745c6a1b674939a704af74b1ff.tar
initscripts-d9f8d5b0dd47ee745c6a1b674939a704af74b1ff.tar.gz
initscripts-d9f8d5b0dd47ee745c6a1b674939a704af74b1ff.tar.bz2
initscripts-d9f8d5b0dd47ee745c6a1b674939a704af74b1ff.tar.xz
initscripts-d9f8d5b0dd47ee745c6a1b674939a704af74b1ff.zip
show usage on bogus arguments
Diffstat (limited to 'src')
-rw-r--r--src/netreport.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/netreport.c b/src/netreport.c
index 56088ec1..c11af5a5 100644
--- a/src/netreport.c
+++ b/src/netreport.c
@@ -21,9 +21,12 @@ int main(int argc, char ** argv) {
if (argc > 2) usage();
- if ((argc > 1) && !strcmp(argv[1], "-r")) {
- action = DEL;
- }
+ if (argc > 1)
+ if (!strcmp(argv[1], "-r")) {
+ action = DEL;
+ } else {
+ usage();
+ }
sprintf(netreport_name, "/var/run/netreport/%d", getppid());
if (action == ADD) {