]> sourceware.org Git - lvm2.git/commitdiff
scripts: avoid voiding write result
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 21 Dec 2018 10:19:25 +0000 (11:19 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 21 Dec 2018 20:42:30 +0000 (21:42 +0100)
Gcc doesn't want to ignore write() return code.

scripts/lvm2_activation_generator_systemd_red_hat.c

index 0e6c05acc51afc45c31ab432a8bcc3e5d510c7a7..b44c8f0e9a4453c96b10efc40ab78656fcf21c32 100644 (file)
@@ -69,7 +69,8 @@ static void _error(const char *format, ...)
                return;
 
        /* The n+31: +30 for "<n>lvm2-activation-generator: " prefix and +1 for '\0' suffix */
-       (void) write(_kmsg_fd, message, n + 31);
+       if (write(_kmsg_fd, message, n + 31) < 0)
+               _error("Failed to write activation message %s: %m.\n", message);
 }
 
 //----------------------------------------------------------------
This page took 0.03346 seconds and 5 git commands to generate.