commit e45297a320046cd9ad042b8fc30f188cd25921dd
parent cb610b2c7ba04b8232978ae7cb312c4b8e84bbd1
Author: FRIGN <dev@frign.de>
Date: Sat, 28 Feb 2015 19:50:12 +0100
Audit dirname(1)
Be stricter about the number of arguments passed to it.
Diffstat:
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/README b/README
@@ -24,7 +24,7 @@ The following tools are implemented ('*' == finished, '#' == UTF-8 support,
=* cron non-posix none
#* cut yes none
=* date yes -u
-=* dirname yes none
+=*| dirname yes none
=* du yes none
=* echo yes none
=* env yes none
diff --git a/dirname.1 b/dirname.1
@@ -1,4 +1,4 @@
-.Dd January 23, 2015
+.Dd February 28, 2015
.Dt DIRNAME 1
.Os sbase
.Sh NAME
@@ -9,9 +9,9 @@
.Ar path
.Sh DESCRIPTION
.Nm
-prints
+writes
.Ar path
-with its final path component removed.
+with its final path component removed to stdout.
.Sh SEE ALSO
.Xr basename 1 ,
.Xr dirname 3
diff --git a/dirname.c b/dirname.c
@@ -18,7 +18,7 @@ main(int argc, char *argv[])
usage();
} ARGEND;
- if (argc < 1)
+ if (argc != 1)
usage();
puts(dirname(argv[0]));