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
From 6f709675c2102a66a56caf45432a829510088324 Mon Sep 17 00:00:00 2001
From: Elliott Hughes <[email protected]>
Date: Sun, 24 Jan 2016 10:51:17 -0800
Subject: [PATCH] Fix comma_args error reporting.
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
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net