From c8eee4268f26c271213e6ba0a047d4101ad4b394 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 18 Jul 2019 13:41:46 -0700 Subject: xargs: don't pretend to support -I. This was embarrassing... A build script that was using xargs -I silently started to ignore -I when we switched over to toybox xargs. The owner of the script has rewritten it to use the shell read builtin instead, but it's pretty unhelpful to silently ignore an option that radically changes how xargs behaves. (The -I behavior sounds sufficiently different from normal behavior that I'm not sure I've understood, and am just sending this cleanup rather than actually implementing -I correctly.) Bug: http://b/137832162 --- toys/posix/xargs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'toys/posix/xargs.c') diff --git a/toys/posix/xargs.c b/toys/posix/xargs.c index 6f8c76fb..12af9125 100644 --- a/toys/posix/xargs.c +++ b/toys/posix/xargs.c @@ -5,10 +5,11 @@ * See http://opengroup.org/onlinepubs/9699919799/utilities/xargs.html * * TODO: Rich's whitespace objection, env size isn't fixed anymore. - * TODO: -x Exit if can't fit everything in one command + * TODO: -I Insert mode * TODO: -L Max number of lines of input per command + * TODO: -x Exit if can't fit everything in one command -USE_XARGS(NEWTOY(xargs, "^I:E:ptrn#<1s#0[!0E]", TOYFLAG_USR|TOYFLAG_BIN)) +USE_XARGS(NEWTOY(xargs, "^E:ptrn#<1s#0[!0E]", TOYFLAG_USR|TOYFLAG_BIN)) config XARGS bool "xargs" @@ -42,7 +43,7 @@ config XARGS_PEDANTIC GLOBALS( long s, n; - char *E, *I; + char *E; long entries, bytes; char delim; -- cgit v1.2.3