Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jul 2002 10:31:59 -0700 (PDT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 15204 for review
Message-ID:  <200207301731.g6UHVxnG023642@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=15204

Change 15204 by rwatson@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@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?200207301731.g6UHVxnG023642>