[Toybox] [groups] : ! More than one in group is error

Ashwini Sharma ak.ashwini at gmail.com
Thu Dec 27 20:32:51 PST 2012


Hi Rob,

  With your fix, it doesn't segfault now.
But does it matter, to give the proper option name in error message. If
yes, then the
fix fails in that.
e.g. when running *./toybox touch -d 12 -r f2 f1* it throws the error
message as
*touch: No 'r' with 't'*.

I feel the error message is not explanatory here. it should give the proper
option names in here.
my patch had this fix.

Pls give your inputs.

regards,
Ashwini

On Fri, Dec 28, 2012 at 6:21 AM, Rob Landley <rob at landley.net> wrote:

> On 12/27/2012 11:06:37 AM, Felix Janda wrote:
>
>> When trying to implement the remaining options for "pwd" I could also test
>> toybox's group option handling.
>>
>> The option string I wanted to use is: ">0LP[!LP]"
>> (It's the same for "LP[!LP]".)
>>
>> With the current argparsing I get a segfault for "pwd -L -P". When
>> enabling
>> TOYBOX_DEBUG it says "pwd: trailing [!LP]". On the other hand when using
>> Ashwini's suggestion with disabled TOYBOX_DEBUG everthing seems to work,
>> whereas with enabled TOYBOX_DEBUG I get the same error message as before.
>>
>
> Ok, this I can reproduce.  Hmmm...
>
> Ah. You're right, the test was wrong. (It got the condition right, but
> couldn't work out the correct error message due to & vs &&.)
>
> Testing for NULL just hid the problem, it didn't fix it. I checked in a
> fix.
>
> Thanks,
>
> Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20121228/44a64d13/attachment-0005.htm>


More information about the Toybox mailing list