Hi all,
In this changeset http://www.landley.net/hg/toybox/rev/e7c742f78361 the
EOF notification of cmp.c went to stdout iso of to stderr.
This however causes the cmp tests to fail, since on my debian laptop
with the fsf cmp it goes to stderr:
edb@lapedb:/tmp$ cat input
ab
c
xedb@lapedb:/tmp$ cat input2
ab
cedb@lapedb:/tmp$ cmp input input2
cmp: EOF on input2
edb@lapedb:/tmp$ cmp input input2 > /dev/null
cmp: EOF on input2
edb@lapedb:/tmp$ cmp input input2 2> /dev/null
edb@lapedb:/tmp$
I have attached a patch to match this behavior, if there is some deeper
reason for the change in hg, then we'll do it the other way around and
modify the tests.
gr
E.
--
Elie De Brauwer
# HG changeset patch
# User Elie De Brauwer <[email protected]>
# Date 1341511900 -7200
# Node ID 456f401cb16d08f13698aef23b542fa34d4a44da
# Parent e6acd7fbbfee3dea84aa44c0a9e34227cf70d6ef
Put cmp.c EOF notice on stderr
diff -r e6acd7fbbfee -r 456f401cb16d toys/cmp.c
--- a/toys/cmp.c Sun Jul 01 23:48:15 2012 -0500
+++ b/toys/cmp.c Thu Jul 05 20:11:40 2012 +0200
@@ -73,7 +73,7 @@
}
if (len1 != len2) {
if (!(toys.optflags & FLAG_s)) {
- printf("cmp: EOF on %s\n",
+ fprintf(stderr, "cmp: EOF on %s\n",
len1 < len2 ? TT.name : name);
}
toys.exitval = 1;
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net