sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit 39b9aab25ad10804109c9442f12ef62a6819bb43
parent b9b28d40392c93ba81fc7143cdb9bd6a7a5d3729
Author: FRIGN <dev@frign.de>
Date:   Sat, 28 Feb 2015 20:05:22 +0100

Audit unlink(1)

One small thing, use argv0 in usage.
Also, add a blank line in link.c which I forgot earlier.

Diffstat:
MREADME | 2+-
Mlink.c | 1+
Munlink.c | 2+-
3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/README b/README @@ -82,7 +82,7 @@ The following tools are implemented ('*' == finished, '#' == UTF-8 support, =* uname yes none #* unexpand yes none =* uniq yes none -=* unlink yes none +=*| unlink yes none =* uudecode yes none =* uuencode yes none #* wc yes none diff --git a/link.c b/link.c @@ -19,6 +19,7 @@ main(int argc, char *argv[]) if (argc != 2) usage(); + if (link(argv[0], argv[1]) < 0) eprintf("link:"); diff --git a/unlink.c b/unlink.c @@ -6,7 +6,7 @@ static void usage(void) { - eprintf("usage: unlink file\n"); + eprintf("usage: %s file\n", argv0); } int