Re: [patch] 2.3.99-pre3-3: dev_alloc_name

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Tue Mar 21 2000 - 07:57:50 EST


> > This is not correct, Linus please don't apply.
> I think it is, Jeff. Try this patch:

Ok you are demonstrating a compiler feature we really don't need. You do need
to make a new string. You also therefore need to fix every case we free a
network device, remembering the names may pretty arbitarily be a constant.

Is there a way to tell egcs to give unique strings for a given array. If not
then we probably need to preprocess the file (Im not doing this by hand that
is for sure) to generate lots of little 8 byte arrays and link each structure
element to its own private array entry.

The patch is wrong, the proposed fix is wrong, the setup config stuff is wrong.

> The next thing to fix is actually putting the command-line ether=
> parameters _somewhere_. My plan for that is to assume that the user is
> correct, and then to just count from the first '...%d' that we find in
> dev_base. Does that sound right?

No. Its completely bogus too.

You must store them elsewhere. You copy the parameters into the structure
at the point you assign the name to the interface. You do it every time
that name comes up however many times you did it before.

Think about the code flow

register - you are eth0 - no card - release
register - you are eth0 - found it
register - you are eth1 - no card release
etc..

A counting solution doesnt work

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:32 EST