Date: Sun, 29 Sep 2002 20:49:43 -0700 (PDT) From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 18357 for review Message-ID: <200209300349.g8U3nhVa095035@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=18357 Change 18357 by rwatson@rwatson_tislabs on 2002/09/29 20:49:30 Reaching new heights in fickleness, immediately change my mind on what argument letter means "don't follow symlinks" and change from "-s" to "-h", making us more compatible with chown/chmod and less compatible with ln. Go figure. Affected files ... .. //depot/projects/trustedbsd/mac/usr.sbin/getfmac/getfmac.c#5 edit .. //depot/projects/trustedbsd/mac/usr.sbin/setfmac/setfmac.c#5 edit Differences ... ==== //depot/projects/trustedbsd/mac/usr.sbin/getfmac/getfmac.c#5 (text+ko) ==== @@ -16,7 +16,7 @@ { fprintf(stderr, - "getfmac [-s] [-l list,of,labels] [file1] [file2 ...]\n"); + "getfmac [-h] [-l list,of,labels] [file1] [file2 ...]\n"); exit (EX_USAGE); } @@ -25,21 +25,21 @@ { char ch, *labellist, *string; mac_t label; - int sflag; + int hflag; int error, i; labellist = NULL; sflag = 0; - while ((ch = getopt(argc, argv, "l:s")) != -1) { + while ((ch = getopt(argc, argv, "hl:")) != -1) { switch (ch) { + case 'h': + hflag = 1; + break; case 'l': if (labellist != NULL) usage(); labellist = argv[optind - 1]; break; - case 's': - sflag = 1; - break; default: usage(); } @@ -57,7 +57,7 @@ return (-1); } - if (sflag) + if (hflag) error = mac_get_link(argv[i], label); else error = mac_get_file(argv[i], label); ==== //depot/projects/trustedbsd/mac/usr.sbin/setfmac/setfmac.c#5 (text+ko) ==== @@ -15,7 +15,7 @@ usage(void) { - fprintf(stderr, "setfmac [-s] [label] [file1] [file2 ...]\n"); + fprintf(stderr, "setfmac [-h] [label] [file1] [file2 ...]\n"); exit (EX_USAGE); } @@ -24,14 +24,14 @@ { char ch; mac_t label; - int sflag; + int hflag; int error, i; sflag = 0; - while ((ch = getopt(argc, argv, "s")) != -1) { + while ((ch = getopt(argc, argv, "h")) != -1) { switch (ch) { - case 's': - sflag = 1; + case 'h': + hflag = 1; break; default: usage(); @@ -51,7 +51,7 @@ } for (i = 1; i < argc; i++) { - if (sflag) + if (hflag) error = mac_set_link(argv[i], label); else error = mac_set_file(argv[i], label); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209300349.g8U3nhVa095035>