[Toybox] [Patch] - args.c failure for group [-abc]

Ashwini Sharma ak.ashwini1981 at gmail.com
Tue Aug 12 00:14:18 PDT 2014


Hi Rob,

For the group __ [-abc] __ handling, while clearing the flags for the
options
to be disabled, it cleared args, for any of the set options until then.

Additional check is added to determine the options arg to be cleared.

     for (clr=gof->opts, i=1; clr; clr = clr->next, i<<=1)
-      if (clr->arg && (i & toys.optflags)) *clr->arg = 0;
+      if (clr->arg && (i & toys.optflags) &&
+          (clr->dex[1] & opt->dex[0])) *clr->arg = 0;
     toys.optflags &= ~opt->dex[0];

Patch is attached for the same.

regards,
Ashwini
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20140812/9151c999/attachment-0003.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: args.c.patch
Type: application/octet-stream
Size: 442 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20140812/9151c999/attachment-0004.obj>


More information about the Toybox mailing list