PERFORCE change 18357 for review
Robert Watson
rwatson at freebsd.org
Mon Sep 30 03:49:43 GMT 2002
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=18357
Change 18357 by rwatson at 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 at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list