On Wed, Sep 12, 2012 at 04:27:01PM +0200, Nikola Pajkovsky wrote:
Vitezslav Samel <vitezslav(a)samel.cz> writes:
> On Wed, Sep 12, 2012 at 12:41:39PM +0200, Nikola Pajkovsky wrote:
>> header definition is hidden in kernel tree under net/core/dev.c in
dev_seq_show.
>>
>> "Inter-| Receive "
>> " | Transmit\n"
>> " face |bytes packets errs drop fifo frame "
>> "compressed multicast|bytes packets errs "
>> "drop fifo colls carrier compressed\n"
>>
>> Signed-off-by: Nikola Pajkovsky <npajkovs(a)redhat.com>
>
> I don't agree. It's more error prone than finding two end-of-lines.
> In the case someone adds a new column to the /proc/net/dev file in
> some 5.9.x kernel and modifies the header then we need to accomodate
> with this and check two types of header.
>
> Leave this as is, please (it's not on any fast path).
>
> Vita
>
> P.S. If you want to change this, then use netlink socket and get
> the interfaces from it.
it wasn't changed since Linux-2.6.12-rc2 (which is kernel import to git)
;)
Still don't agree. Don't change code which perfectly works.
Vita