From 99f2ac4e5dc829174564dca2a819f2270c0d6858 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 14 Nov 2019 12:28:15 -0800 Subject: 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(-) (limited to 'toys/posix/xargs.c') 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) { -- cgit v1.2.3