[BusyBox] nameif applet patch
Nick Fedchik
fnm at fusion.ukrsat.com
Fri Dec 13 00:17:05 UTC 2002
On Fri, 13 Dec 2002, Glenn McGrath wrote:
> I changed the error messsage handling to save a couple of hundred more
> bytes, and changes the error messages to make them closer to upstream.
That's ok, it was in my TODO.
IMHO somethink like that serror_msg_and_die() should be in the busybox
utils library. Also it will be useful, if this call will have a flag
"to die or not to die" :)))
> It could have got you to check it first, but i checked it in anyway, we
> can work from cvs if its still needs changes.
IMHO its still need changes.
I get the latest version from anon cvs.
For example, look here - it's incorrect message:
188: if (ioctl(ctl_sk, SIOCGIFHWADDR, &ifr) < 0) {
189: serror_msg_and_die(use_syslog, "cannot change
name of %s to %s: %s", ifr.ifr_name, ch->ifname, strerror(errno));
190: }
This call to get macaddr, but msg like one for
ioctl(ctl_sk, SIOCSIFNAME, &ifr)
so I think You just hurry and make a copy without checks.
Also it should be
continue;
but not errmsg/exit, because the called interface probably has no mac.
Plz fix it - I haven't ssh account on busybox cvs to commit it.
> It only adds 2600 bytes to a bare busybox :)
Good! :)
--
Nick Fedchik <fnm at fusion.ukrsat.com>
FNM3-RIPE (-UANIC), UkrSat ISP
More information about the busybox
mailing list