not urgent, but confused me today. (on Android errno is usually
non-zero by this point because of the failed tty search.)

-- 
Elliott Hughes - http://who/enh - http://jessies.org/~enh/
Android native code/tools questions? Mail me/drop by/add me as a reviewer.
From 3b4e041113b63ea4a53e6293d2b01c988778df68 Mon Sep 17 00:00:00 2001
From: Elliott Hughes <[email protected]>
Date: Wed, 18 Nov 2015 14:30:50 -0800
Subject: [PATCH] Fix ps -o error reporting.

There's nothing relevant in errno, so we shouldn't print it.
---
 toys/posix/ps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/toys/posix/ps.c b/toys/posix/ps.c
index e42e7ec..db219be 100644
--- a/toys/posix/ps.c
+++ b/toys/posix/ps.c
@@ -438,7 +438,7 @@ void comma_args(struct arg_list *al, char *err,
     arg = al->arg;
     while ((next = comma_iterate(&arg, &len)))
       if ((next = callback(next, len)))
-        perror_exit("%s '%s'\n%*c", err, al->arg,
+        error_exit("%s '%s'\n%*c", err, al->arg,
           (int)(5+strlen(toys.which->name)+strlen(err)+next-al->arg), '^');
     al = al->next;
   }
-- 
2.6.0.rc2.230.g3dd15c0

_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to