[Toybox] [PATCH] Fix comma_args error reporting.
enh
enh at google.com
Sun Jan 24 10:53:00 PST 2016
None of the current callers' callbacks set errno, so this was resulting in
bogus errors like "No device or address" when ps tried to complain about a
misspelled field.
---
lib/getmountlist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/getmountlist.c b/lib/getmountlist.c
index 7a43101..332852a 100644
--- a/lib/getmountlist.c
+++ b/lib/getmountlist.c
@@ -19,7 +19,7 @@ void comma_args(struct arg_list *al, void *data, char *err,
arg = al->arg;
while ((next = comma_iterate(&arg, &len)))
if ((next = callback(data, 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.7.0.rc3.207.g0ac5344
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-comma_args-error-reporting.patch
Type: text/x-patch
Size: 1001 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20160124/a2585d18/attachment-0004.bin>
More information about the Toybox
mailing list