Date: Fri, 15 Nov 2002 08:58:09 -0800 (PST) From: Brian Feldman <green@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 21070 for review Message-ID: <200211151658.gAFGw9Ec002100@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=21070 Change 21070 by green@green_laptop_2 on 2002/11/15 08:58:01 * Correct the usage for setfmac(8) in its manpage and that of setf{,s}mac(8) in the usage() statement. * Implement -R for recursive labelling for setfmac.8 since it's essentially free now. Affected files ... .. //depot/projects/trustedbsd/mac/sbin/setfsmac/setfmac.8#2 edit .. //depot/projects/trustedbsd/mac/sbin/setfsmac/setfsmac.c#7 edit Differences ... ==== //depot/projects/trustedbsd/mac/sbin/setfsmac/setfmac.8#2 (text+ko) ==== @@ -39,9 +39,9 @@ .Nd set MAC label for a file system object .Sh SYNOPSIS .Nm -.Ar label -.Ar file -.Op Ar file ... +.Op Fl Rh +.Ar label file +.Op Ar ... .Sh DESCRIPTION The .Nm ==== //depot/projects/trustedbsd/mac/sbin/setfsmac/setfsmac.c#7 (text+ko) ==== @@ -86,7 +86,7 @@ FTSENT *ftsent; FTS *fts; struct label_specs *specs; - int eflag = 0, xflag = 0, vflag = 0, hflag; + int eflag = 0, xflag = 0, vflag = 0, Rflag = 0, hflag; int ch, is_setfmac; char *bn; @@ -96,8 +96,11 @@ is_setfmac = strcmp(bn, "setfmac") == 0; hflag = is_setfmac ? FTS_LOGICAL : FTS_PHYSICAL; specs = new_specs(); - while ((ch = getopt(argc, argv, is_setfmac ? "h" : "ef:s:vx")) != -1) { + while ((ch = getopt(argc, argv, is_setfmac ? "Rh" : "ef:s:vx")) != -1) { switch (ch) { + case 'R': + Rflag = 1; + break; case 'e': eflag = 1; break; @@ -143,7 +146,7 @@ case FTS_D: /* do pre-order */ case FTS_DC: /* do cyclic? */ /* don't ever recurse directories as setfmac(8) */ - if (is_setfmac) + if (is_setfmac && !Rflag) fts_set(fts, ftsent, FTS_SKIP); case FTS_DEFAULT: /* do default */ case FTS_F: /* do regular */ @@ -180,9 +183,9 @@ { if (is_setfmac) - fprintf(stderr, "usage: setfmac [-h] label path ...\n"); + fprintf(stderr, "usage: setfmac [-Rh] label path [...]\n"); else - fprintf(stderr, "usage: setfsmac [-evx] [-f specfile [...]] [-s specfile [...]] path ...\n"); + fprintf(stderr, "usage: setfsmac [-evx] [-f specfile [...]] [-s specfile [...]] path [...]\n"); exit(1); } 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?200211151658.gAFGw9Ec002100>