One is really "the command is too long for me to ever call it given
other constraints", so leave "argument too long" for the case where it's
actually an argument causing the issue.
---
toys/posix/xargs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From dc86999850ec4abca7377268659c603e41941a88 Mon Sep 17 00:00:00 2001
From: Elliott Hughes <[email protected]>
Date: Thu, 14 Nov 2019 12:28:15 -0800
Subject: [PATCH] xargs: distinguish the two "argument too long" error cases.
One is really "the command is too long for me to ever call it given
other constraints", so leave "argument too long" for the case where it's
actually an argument causing the issue.
---
toys/posix/xargs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/toys/posix/xargs.c b/toys/posix/xargs.c
index 367f2297..79e7dea5 100644
--- a/toys/posix/xargs.c
+++ b/toys/posix/xargs.c
@@ -117,7 +117,7 @@ void xargs_main(void)
// count entries
for (entries = 0, bytes = -1; entries < toys.optc; entries++)
bytes += strlen(toys.optargs[entries])+1+sizeof(char *)*!FLAG(s);
- if (bytes >= TT.s) error_exit("argument too long");
+ if (bytes >= TT.s) error_exit("command too long");
// Loop through exec chunks.
while (data || !done) {
--
2.24.0.432.g9d3f5f5b63-goog
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net