[Toybox] Integer value parsing issue
Kyungwan Han
asura321 at gmail.com
Fri Apr 5 07:16:13 PDT 2013
Hi,
I'm making arping, but I find some issue about parsing integer value when I
test toybox arping.
Toybox infra code handles the number values in three way:
1. if you input 10, it is treated as decimal number. it is 10
2. if you input 010, it is treated as octal number. it is 8
3. if you input 0x10, it is treated as Hex number. it is 16
So when I execute *$ toybox arping -c 010 100.0.0.1, *arping* *is executed
8 times.
In my ubuntu, however, when I execute *$ arping -c 010 100.0.0.1*, arping
is executed 10 times.
*
*
*
*
I think toybox's approach is right, because it can supports octal, hex
number automatically.
It's very useful.
But above case, some people can be confused.
Is it fine?
How about your opinion?
Thanks.
Kyungwan Han.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20130405/d1380a0b/attachment-0001.htm>
More information about the Toybox
mailing list