diff options
author | Manuel Novoa III | 2003-03-19 09:13:01 +0000 |
---|---|---|
committer | Manuel Novoa III | 2003-03-19 09:13:01 +0000 |
commit | cad5364599eb5062d59e0c397ed638ddd61a8d5d (patch) | |
tree | a318d0f03aa076c74b576ea45dc543a5669e8e91 /coreutils/dirname.c | |
parent | e01f9662a5bd5d91be4f6b3941b57fff73cd5af1 (diff) | |
download | busybox-cad5364599eb5062d59e0c397ed638ddd61a8d5d.zip busybox-cad5364599eb5062d59e0c397ed638ddd61a8d5d.tar.gz |
Major coreutils update.
Diffstat (limited to 'coreutils/dirname.c')
-rw-r--r-- | coreutils/dirname.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/coreutils/dirname.c b/coreutils/dirname.c index 3872337..4c6115e 100644 --- a/coreutils/dirname.c +++ b/coreutils/dirname.c @@ -21,20 +21,20 @@ * */ -/* getopt not needed */ +/* BB_AUDIT SUSv3 compliant */ +/* http://www.opengroup.org/onlinepubs/007904975/utilities/dirname.html */ #include <stdio.h> #include <stdlib.h> -#include <string.h> #include "busybox.h" extern int dirname_main(int argc, char **argv) { - if ((argc < 2) || (**(argv + 1) == '-')) - show_usage(); - argv++; + if (argc != 2) { + bb_show_usage(); + } - puts (dirname (argv[0])); + puts(dirname(argv[1])); - return EXIT_SUCCESS; + bb_fflush_stdout_and_exit(EXIT_SUCCESS); } |