diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2018-12-21 11:19:25 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2018-12-21 21:42:30 +0100 |
commit | a4577c427a76c6a337b7812f9da7700c2c8beb89 (patch) | |
tree | b50230d080d6520d8d87f2d16d0d17a15c422adb /scripts | |
parent | a3fe6195521a58c93d7158028c7ab62da14d4ddd (diff) | |
download | lvm2-a4577c427a76c6a337b7812f9da7700c2c8beb89.tar.gz |
scripts: avoid voiding write result
Gcc doesn't want to ignore write() return code.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lvm2_activation_generator_systemd_red_hat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/lvm2_activation_generator_systemd_red_hat.c b/scripts/lvm2_activation_generator_systemd_red_hat.c index 0e6c05acc..b44c8f0e9 100644 --- a/scripts/lvm2_activation_generator_systemd_red_hat.c +++ b/scripts/lvm2_activation_generator_systemd_red_hat.c @@ -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); } //---------------------------------------------------------------- |