[Toybox] dumpleases.c patch
Rob Landley
rob at landley.net
Mon Dec 21 06:54:43 PST 2020
On 12/21/20 7:19 AM, Anatoly Mihailov wrote:
> Hello. I found that description of dumpleases toy referring to udhcpd from
> busybox, but toybox have dhcpd instead of udhcpd.
> I made patch to fix this:
>
> --- dumpleases.c 2020-12-21 18:05:36.623880028 +0500
> +++ dumpleases.c 2020-12-21 17:44:45.094338953 +0500
> @@ -1,4 +1,4 @@
> -/* dumpleases.c - Dump the leases granted by dhcpd.
> +/* dumpleases.c - Dump the leases granted by udhcpd.
> *
> * Copyright 2013 Sandeep Sharma <sandeep.jack2756 at gmail.com
> <mailto:sandeep.jack2756 at gmail.com>>
> * Copyright 2013 Kyungwan Han <asura321 at gmail.com <mailto:asura321 at gmail.com>>
> @@ -12,7 +12,7 @@
> help
> usage: dumpleases [-r|-a] [-f LEASEFILE]
>
> - Display DHCP leases granted by dhcpd
> + Display DHCP leases granted by udhcpd
> -f FILE, Lease file
> -r Show remaining time
> -a Show expiration time
Sigh:
http://lists.landley.net/pipermail/toybox-landley.net/2015-April/004026.html
I yelled at the people who were submitting that stuff into pending, but have not
had the energy to go through and clean up those commands yet. For one thing,
"dumpleases" is bad design, it should be "dhcpd --dump" or similar. Also,
writing a binary structure into the file directly is just asking for version
skew, why isn't the file human readable already? (Then you could just "cat" it.)
My brain is full of shell stuff right now. In theory, then I need to do route,
then I need to go through the list of pending commands android is building, then
I need to get linux from scratch building, _then_ I can redo this. In practice,
that's far enough ahead I can't predict...
Rob
More information about the Toybox
mailing list