aboutsummaryrefslogtreecommitdiff
path: root/toys/posix
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-11-14 12:28:15 -0800
committerRob Landley <rob@landley.net>2019-11-14 19:51:33 -0600
commit99f2ac4e5dc829174564dca2a819f2270c0d6858 (patch)
tree1313fc52770d8c96d9c21cd6b4313e495eba83a6 /toys/posix
parentb213f91a0031da91eb6d3b86c7e724a0f7725d3e (diff)
downloadtoybox-99f2ac4e5dc829174564dca2a819f2270c0d6858.tar.gz
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.
Diffstat (limited to 'toys/posix')
-rw-r--r--toys/posix/xargs.c2
1 files changed, 1 insertions, 1 deletions
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) {