Audit link(1)
This commit is contained in:
parent
804b62f7a2
commit
cb610b2c7b
2
README
2
README
|
@ -37,7 +37,7 @@ The following tools are implemented ('*' == finished, '#' == UTF-8 support,
|
||||||
=* head yes none
|
=* head yes none
|
||||||
=* hostname non-posix none
|
=* hostname non-posix none
|
||||||
=* kill yes none
|
=* kill yes none
|
||||||
=* link yes none
|
=*| link yes none
|
||||||
=* ln yes none
|
=* ln yes none
|
||||||
=* logger yes none
|
=* logger yes none
|
||||||
=* logname yes none
|
=* logname yes none
|
||||||
|
|
18
link.c
18
link.c
|
@ -3,14 +3,24 @@
|
||||||
|
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
|
static void
|
||||||
|
usage(void)
|
||||||
|
{
|
||||||
|
eprintf("usage: %s target name\n", argv0);
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argv0 = argv[0];
|
ARGBEGIN {
|
||||||
|
default:
|
||||||
|
usage();
|
||||||
|
} ARGEND;
|
||||||
|
|
||||||
if (argc != 3)
|
if (argc != 2)
|
||||||
eprintf("usage: %s target name\n", argv0);
|
usage();
|
||||||
if (link(argv[1], argv[2]) < 0)
|
if (link(argv[0], argv[1]) < 0)
|
||||||
eprintf("link:");
|
eprintf("link:");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user