PERFORCE change 15204 for review

Robert Watson rwatson at freebsd.org
Tue Jul 30 17:31:59 GMT 2002


http://people.freebsd.org/~peter/p4db/chv.cgi?CH=15204

Change 15204 by rwatson at rwatson_paprika on 2002/07/30 10:31:30

	Improve error reporting formatting and content.

Affected files ...

.. //depot/projects/trustedbsd/mac/usr.sbin/ugidfw/ugidfw.c#8 edit

Differences ...

==== //depot/projects/trustedbsd/mac/usr.sbin/ugidfw/ugidfw.c#8 (text+ko) ====

@@ -68,13 +68,15 @@
 
 	rule_slots = bsde_get_rule_slots(BUFSIZ, errstr);
 	if (rule_slots == -1) {
-		fprintf(stderr, errstr);
+		fprintf(stderr, "Unable to get rule slots; mac_bsdextended.ko "
+		    "may not be loaded.\n");
+		fprintf(stderr, "bsde_get_rule_slots: %s\n", errstr);
 		exit (-1);
 	}
 
 	rule_count = bsde_get_rule_count(BUFSIZ, errstr);
 	if (rule_count == -1) {
-		fprintf(stderr, errstr);
+		fprintf(stderr, "bsde_get_rule_count: %s\n", errstr);
 		exit (-1);
 	}
 
@@ -93,7 +95,8 @@
 		}
 
 		if (bsde_rule_to_string(&rule, charstr, BUFSIZ) == -1)
-			printf("oops!\n");
+			fprintf(stderr,
+			    "Unable to translate rule %d to string\n", i);
 		else
 			printf("%d %s\n", i, charstr);
 	}
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