[Toybox] [PATCH] ip.c: addr by default? Fix "make ipaddr" breaks due to no config symbols

Oliver Webb aquahobbyist at proton.me
Mon Apr 8 20:49:18 PDT 2024


Since someone made a github issue requesting ip, I took a closer look at ip.c

The first thing I noticed is that "ip" with no args returns usage text instead
of help text (Like sed did before that got fixed some time months ago) or
defaulting to "ip addr" (Which is what ip usually does). Not a big issue, but
still it'd be nice to have that since non-toybox ip does "ip addr" on no args.

The second issue is that "make ipaddr" breaks because of a compiler error in
scripts/install.c when trying to include generated/newtoys.h for "help_data".
Which is weird, but it's due to multiple OLDTOYS using the same USE_ macro.

They need their own USE_ macros and config symbols like {e,f}grep if they should
be build-able as individual sub-commands. (Unlike {e,f}grep, they should default
to "n" so they don't get included on a build of ip)

Attached is a patch which fixes "make ipsubcmd"

-   Oliver Webb <aquahobbyist at proton.me>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ip.c-Give-subcommands-their-own-config-symbols-so-th.patch
Type: text/x-patch
Size: 1546 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20240409/21009cee/attachment.bin>


More information about the Toybox mailing list