summaryrefslogtreecommitdiff
path: root/harmony/coreutils/seq-write-error.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-02-27 14:34:02 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-02-27 14:34:02 -0600
commit7553795ec2d735c01dbdde129a65b7f45d5aa999 (patch)
treeb3970009a8246b0c17a105fe6b10c8077fc2b763 /harmony/coreutils/seq-write-error.patch
parente2b01859c88d221992403d1293d42da33002be4d (diff)
downloadpackages-7553795ec2d735c01dbdde129a65b7f45d5aa999.tar.gz
packages-7553795ec2d735c01dbdde129a65b7f45d5aa999.tar.bz2
packages-7553795ec2d735c01dbdde129a65b7f45d5aa999.tar.xz
packages-7553795ec2d735c01dbdde129a65b7f45d5aa999.zip
Add harmony/ repo for packages still being discussed
See https://wiki.adelielinux.org/wiki/Project:Harmony
Diffstat (limited to 'harmony/coreutils/seq-write-error.patch')
-rw-r--r--harmony/coreutils/seq-write-error.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/harmony/coreutils/seq-write-error.patch b/harmony/coreutils/seq-write-error.patch
new file mode 100644
index 000000000..4892a82ec
--- /dev/null
+++ b/harmony/coreutils/seq-write-error.patch
@@ -0,0 +1,45 @@
+From 1e1dbbe0f95c7170009f3ba4d8380c1b98ff53c8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
+Date: Sun, 13 Aug 2017 00:18:43 -0700
+Subject: [PATCH] seq: produce consistent error messages upon write error
+
+* src/seq.c (io_error): Use the same error message as would
+be generated at exit time when closing the stdout stream.
+The inconsistency was added with commit v8.25-26-gc92585b.
+This was noticed due to an inconsistency in the expected
+error message generated by seq on musl libc.
+Reported by A. Wilcox.
+---
+ src/seq.c | 2 +-
+ tests/misc/seq-epipe.sh | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/seq.c b/src/seq.c
+index bb191ba..5e5b381 100644
+--- a/src/seq.c
++++ b/src/seq.c
+@@ -284,7 +284,7 @@ io_error (void)
+ {
+ /* FIXME: consider option to silently ignore errno=EPIPE */
+ clearerr (stdout);
+- die (EXIT_FAILURE, errno, _("standard output"));
++ die (EXIT_FAILURE, errno, _("write error"));
+ }
+
+ /* Actually print the sequence of numbers in the specified range, with the
+diff --git a/tests/misc/seq-epipe.sh b/tests/misc/seq-epipe.sh
+index edbd563..69dd75d 100755
+--- a/tests/misc/seq-epipe.sh
++++ b/tests/misc/seq-epipe.sh
+@@ -33,7 +33,7 @@ compare exp code || fail=1
+
+ # The error message must begin with "standard output:"
+ # (but don't hard-code the strerror text)
+-grep '^seq: standard output: ' err \
++grep '^seq: write error: ' err \
+ || { warn_ "seq emitted incorrect error on EPIPE"; \
+ cat err;\
+ fail=1; }
+--
+2.9.3
+