Date: Tue, 14 Nov 2006 20:40:44 GMT From: Todd Miller <millert@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 109990 for review Message-ID: <200611142040.kAEKei7Y048166@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=109990 Change 109990 by millert@millert_g5tower on 2006/11/14 20:40:34 Update from FreeBSD Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/mac_cmds/getfmac/getfmac.c#2 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/mac_cmds/getfmac/getfmac.c#2 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/usr.sbin/getfmac/getfmac.c,v 1.1 2002/10/23 03:15:23 rwatson Exp $ + * $FreeBSD: src/usr.sbin/getfmac/getfmac.c,v 1.3 2005/01/27 14:44:38 delphij Exp $ */ #include <sys/types.h> #include <security/mac.h> @@ -46,22 +46,21 @@ #define MAXELEMENTS 32 -void +static void usage(void) { fprintf(stderr, "getfmac [-h] [-l list,of,labels] [file1] [file2 ...]\n"); - exit (EX_USAGE); } int main(int argc, char *argv[]) { - char ch, *labellist, *string; + char *labellist, *string; mac_t label; - int hflag; + int ch, hflag; int error, i; labellist = NULL; @@ -94,9 +93,9 @@ } if (hflag) - error = mac_get_link (argv[i], label); + error = mac_get_link(argv[i], label); else - error = mac_get_file (argv[i], label); + error = mac_get_file(argv[i], label); if (error) { perror(argv[i]); mac_free(label); @@ -104,9 +103,9 @@ } error = mac_to_text(label, &string); - if (error != 0) { + if (error != 0) perror("mac_to_text"); - } else { + else { printf("%s: %s\n", argv[i], string); free(string); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611142040.kAEKei7Y048166>