diff cinst/nssstore_linux.c @ 439:c88090a15ae4

Fix cinstprocesstest for new arguments. Handle errno on write errors
author Andre Heinecke <aheinecke@intevation.de>
date Tue, 22 Apr 2014 13:27:23 +0000
parents 17e1c8f37d72
children e8d761c2d2d1
line wrap: on
line diff
--- a/cinst/nssstore_linux.c	Tue Apr 22 13:00:15 2014 +0000
+++ b/cinst/nssstore_linux.c	Tue Apr 22 13:27:23 2014 +0000
@@ -19,6 +19,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <limits.h>
+#include <errno.h>
 
 #include "nssstore.h"
 #include "logging.h"
@@ -187,7 +188,7 @@
     {
       if (fprintf (stream, "I:%s\n", to_install[i]) <= 3)
         {
-          ERRORPRINTF ("Write failed \n");
+          ERRORPRINTF ("Write failed: %s \n", strerror(errno));
           goto done;
         }
     }
@@ -196,7 +197,7 @@
     {
       if (fprintf (stream, "R:%s\n", to_remove[i]) <= 3)
         {
-          ERRORPRINTF ("Write failed \n");
+          ERRORPRINTF ("Write failed: %s \n", strerror(errno));
           goto done;
         }
     }

http://wald.intevation.org/projects/trustbridge/