Reject options, handle "--" end-of-options marker in link(1).

This commit is contained in:
Tim J. Robbins 2002-05-30 00:57:38 +00:00
parent 80a4c82db1
commit dab94652b1

View File

@ -85,11 +85,14 @@ main(int argc, char *argv[])
else
++p;
if (strcmp(p, "link") == 0) {
if (argc == 3) {
linkf = link;
exit(linkit(argv[1], argv[2], 0));
} else
while (getopt(argc, argv, "") != -1)
usage();
argc -= optind;
argv += optind;
if (argc != 2)
usage();
linkf = link;
exit(linkit(argv[0], argv[1], 0));
}
while ((ch = getopt(argc, argv, "fhinsv")) != -1)