Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/veriexecctl Be a bit more verbose if the kernel rejects...



details:   https://anonhg.NetBSD.org/src/rev/b5955d889da4
branches:  trunk
changeset: 807892:b5955d889da4
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sun Apr 26 09:20:09 2015 +0000

description:
Be a bit more verbose if the kernel rejects a file

diffstat:

 sbin/veriexecctl/veriexecctl.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (24 lines):

diff -r 3b556577da12 -r b5955d889da4 sbin/veriexecctl/veriexecctl.c
--- a/sbin/veriexecctl/veriexecctl.c    Sun Apr 26 09:16:06 2015 +0000
+++ b/sbin/veriexecctl/veriexecctl.c    Sun Apr 26 09:20:09 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: veriexecctl.c,v 1.37 2014/07/27 04:23:44 dholland Exp $        */
+/*     $NetBSD: veriexecctl.c,v 1.38 2015/04/26 09:20:09 maxv Exp $    */
 
 /*-
  * Copyright 2005 Elad Efrat <elad%NetBSD.org@localhost>
@@ -248,10 +248,11 @@
                        err(1, "Cannot open `%s'", file);
 
                yyin = fdopen(lfd, "r");
+               yyparse();
+               fclose(yyin);
 
-               yyparse();
-
-               (void)fclose(yyin);
+               if (error != EXIT_SUCCESS)
+                       errx(1, "Cannot load '%s'", file);
        } else if (argc == 2 && strcasecmp(argv[0], "delete") == 0) {
                prop_dictionary_t dp;
                struct stat sb;



Home | Main Index | Thread Index | Old Index