[Toybox] [CLEANUP] ifconfig commit 864
Rob Landley
rob at landley.net
Sat Jan 4 14:54:28 PST 2014
Commit http://landley.net/hg/toybox/rev/864
Move the next pointer of struct _iface_list to the start of the struct
so we can use the llist infrastructure. Collate iface_flags_str[] to
take up fewer lines.
Remove set_data() from the prototype list because we're going to inline
it everywhere it's used.
Add an xioctl() wrapper to error_exit() for us if the ioctl fails. (This
may move to lib/ later on, but doesn't need to yet. The error message
isn't quite as descriptive, but "SIOCGIFNAME" wasn't hugely user
friendly either.) At the same time remove set_data() and inline it
everywhere it's used, it's mostly just xioctl().
More whitespace changes and error_exit() help string trimming. Don't
combine perror_exit() with gai_strerror(), use error_exit() instead so
we don't add an extra (confusing) strerror(errno) after the
gai_strerror() text.
While inlining set_data() and adjusting curly brackets, remove a "// end
of thingy" comment where the corresponding "if (thingy)" is only three
lines earlier. It's not needing and nothing else around here is doing it
so that makes it inconsistent as well.
Remove more NOP return; statements at the end of void functions.
1388876068.0
More information about the Toybox
mailing list