aboutsummaryrefslogtreecommitdiff
path: root/toys/posix
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2018-04-23 14:09:48 -0700
committerRob Landley <rob@landley.net>2018-04-23 21:44:54 -0500
commit3169d948c049664bcf7216d4c4ae751881099d3e (patch)
treea8a45e0afc9fb0766a8719603b23324f50a5ab7e /toys/posix
parentdffdc0a75b70a71541f5d648dbffb6209e670cff (diff)
downloadtoybox-3169d948c049664bcf7216d4c4ae751881099d3e.tar.gz
Don't include spurious '\r's in `top -b` output.
Diffstat (limited to 'toys/posix')
-rw-r--r--toys/posix/ps.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/posix/ps.c b/toys/posix/ps.c
index b8542e60..c5c0f790 100644
--- a/toys/posix/ps.c
+++ b/toys/posix/ps.c
@@ -1359,9 +1359,9 @@ static int header_line(int line, int rev)
if (toys.optflags&FLAG_b) rev = 0;
- printf("%s%*.*s%s\r\n", rev ? "\033[7m" : "",
+ printf("%s%*.*s%s\n", rev ? "\033[7m" : "",
(toys.optflags&FLAG_b) ? 0 : -TT.width, TT.width, toybuf,
- rev ? "\033[0m" : "");
+ rev ? "\033[0m\r" : "");
return line-1;
}