[Toybox] [PATCH] add missing space in dd output

enh enh at google.com
Fri Mar 13 16:18:14 PDT 2015


Also, coreutils says "s" instead of "seconds". POSIX specifies the
format of the previous two lines, but doesn't even mention this line.

diff --git a/toys/pending/dd.c b/toys/pending/dd.c
index a5c2452..3449104 100644
--- a/toys/pending/dd.c
+++ b/toys/pending/dd.c
@@ -134,9 +134,9 @@ static void summary()
   fprintf(stderr,"%llu+%llu records in\n%llu+%llu records out\n",
st.in_full, st.in_part,
       st.out_full, st.out_part);
   human_readable(toybuf, st.bytes);
-  fprintf(stderr, "%llu bytes (%s) copied,",st.bytes, toybuf);
+  fprintf(stderr, "%llu bytes (%s) copied, ",st.bytes, toybuf);
   human_readable(toybuf, st.bytes/seconds);
-  fprintf(stderr, "%f seconds, %s/s\n", seconds, toybuf);
+  fprintf(stderr, "%f s, %s/s\n", seconds, toybuf);
 }

 static void sig_handler(int sig)

 1426288694.0


More information about the Toybox mailing list