aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-04-21 22:04:05 +0000
committerMike Frysinger <vapier@gentoo.org>2006-04-21 22:04:05 +0000
commit70cbb6e02626608c95a74e74bdc51bbbf7fb570b (patch)
tree04d1aae14aa24819b94bcbfc105aad0f46951152
parent10f55b1daed9ab17c594fa0598aeea8002a70afc (diff)
downloadbusybox-w32-70cbb6e02626608c95a74e74bdc51bbbf7fb570b.tar.gz
busybox-w32-70cbb6e02626608c95a74e74bdc51bbbf7fb570b.tar.bz2
busybox-w32-70cbb6e02626608c95a74e74bdc51bbbf7fb570b.zip
Jason Schoon writes: Attached is a patch to display the usage message if fuser is called with no arguments, rather than doing no work and failing silently.
-rw-r--r--procps/fuser.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/procps/fuser.c b/procps/fuser.c
index 850626e42..35d77ed1c 100644
--- a/procps/fuser.c
+++ b/procps/fuser.c
@@ -326,6 +326,9 @@ int fuser_main(int argc, char **argv)
326 int killsig = SIGTERM; 326 int killsig = SIGTERM;
327 int success = 1; 327 int success = 1;
328 328
329 if (argc < 2)
330 bb_show_usage();
331
329 fni = xmalloc(sizeof(int)); 332 fni = xmalloc(sizeof(int));
330 for(i=1;i<argc;i++) { 333 for(i=1;i<argc;i++) {
331 optn = fuser_option(argv[i]); 334 optn = fuser_option(argv[i]);