chiark / gitweb /
fileio-label: return error when writing fails
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 3 Oct 2014 12:58:40 +0000 (08:58 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 3 Oct 2014 12:58:40 +0000 (08:58 -0400)
The status of actually writing the file was totally ignored.

src/shared/fileio-label.c

index c3def3c568fd615ffbec57b6c9f11de5d7ec8aaa..d5ce24c0d99d02266025a624e1f0190a3f7889d8 100644 (file)
@@ -34,7 +34,7 @@ int write_string_file_atomic_label(const char *fn, const char *line) {
         if (r < 0)
                 return r;
 
-        write_string_file_atomic(fn, line);
+        r = write_string_file_atomic(fn, line);
 
         label_context_clear();
 
@@ -48,7 +48,7 @@ int write_env_file_label(const char *fname, char **l) {
         if (r < 0)
                 return r;
 
-        write_env_file(fname, l);
+        r = write_env_file(fname, l);
 
         label_context_clear();