[PATCH] Support for the LOWER_UP flag
Denys Vlasenko
vda.linux at googlemail.com
Thu Jun 5 06:58:04 PDT 2008
On Wednesday 04 June 2008 20:29, Natanael Copa wrote:
> Hi,
>
> Attatched is a patch for the LOWER_UP flag in 'ip link/addr' output.
> Useful to check if network cable is inserted or not.
>
> The code does an ugly ifdef to check if IFF_LOWER_UP is declared or not.
> On my zenwalk desktop it was not. It looks like iproute2 maintain their
> own copies of the linux headers so I suppose we cannot expect the flag
> be there. (should mabe be in one of the include files rather than in the
> .c file?)
>
> The patch does increase the size a bit due to a macro. Maybe should have
> a config option for it?
>
> on my hardened uclibc i386 build:
>
> function old new delta
> ipaddr_list_or_flush 2929 2981 +52
> .rodata 7677 7683 +6
> ------------------------------------------------------------------------------
> (add/remove: 0/0 grow/shrink: 2/0 up/down: 58/0) Total: 58
> bytes
> text data bss dec hex filename
> 47498 670 4244 52412 ccbc busybox_old
> 47556 670 4244 52470 ccf6 busybox_unstripped
Applied, thanks. (It also brought my attention to ~300+ bytes
of bloat nearby, which I removed).
--
vda
More information about the busybox
mailing list