[systemd-commits] src/shared

Lennart Poettering lennart at kemper.freedesktop.org
Fri May 15 08:07:43 PDT 2015


 src/shared/generator.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 2929b4a6ad8146d3ae2cc65d9b24ae3c4951c92f
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri May 15 17:06:59 2015 +0200

    generator: use fflush_and_check() where appropriate

diff --git a/src/shared/generator.c b/src/shared/generator.c
index d48b400..8128499 100644
--- a/src/shared/generator.c
+++ b/src/shared/generator.c
@@ -67,9 +67,9 @@ static int write_fsck_sysroot_service(const char *dir, const char *what) {
                 what,
                 device);
 
-        fflush(f);
-        if (ferror(f))
-                return log_error_errno(errno, "Failed to write unit file %s: %m", unit);
+        r = fflush_and_check(f);
+        if (r < 0)
+                return log_error_errno(r, "Failed to write unit file %s: %m", unit);
 
         return 0;
 }



More information about the systemd-commits mailing list