diff options
author | Karel Zak | 2014-03-13 12:39:09 +0100 |
---|---|---|
committer | Karel Zak | 2014-03-13 12:39:09 +0100 |
commit | 97c3278925794be6636f803c8bfbdf8bff71aa91 (patch) | |
tree | 784d24be1b15bc105b842dd9765a5b8a204e7881 /sys-utils/dmesg.c | |
parent | libfdisk: (gpt) use entry attributes as bitmap (diff) | |
download | kernel-qcow2-util-linux-97c3278925794be6636f803c8bfbdf8bff71aa91.tar.gz kernel-qcow2-util-linux-97c3278925794be6636f803c8bfbdf8bff71aa91.tar.xz kernel-qcow2-util-linux-97c3278925794be6636f803c8bfbdf8bff71aa91.zip |
dmesg: don't report EPIPE
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/dmesg.c')
-rw-r--r-- | sys-utils/dmesg.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c index c1f84a568..df68c8440 100644 --- a/sys-utils/dmesg.c +++ b/sys-utils/dmesg.c @@ -639,8 +639,11 @@ static void safe_fwrite(const char *buf, size_t size, FILE *out) rc = fwrite_hex(p, len, out); else rc = fwrite(p, 1, len, out) != len; - if (rc != 0) - err(EXIT_FAILURE, _("write failed")); + if (rc != 0) { + if (errno != EPIPE) + err(EXIT_FAILURE, _("write failed")); + exit(EXIT_SUCCESS); + } } } |