Patch to change net_device.name from char* to char[].

From: Nick Holloway (Nick.Holloway@alfie.demon.co.uk)
Date: Sat Apr 29 2000 - 03:40:46 EST


torvalds@transmeta.com (Linus Torvalds) writes:
> > > include/linux/netdevice.h:
> > >
> > > struct net_device {
> > > ...
> > > - char *name;
> > > + char name[16];
> > > ...

A while ago, I said I had started a patch that updated the network drivers
to support this. As it has been a while, I thought it would be better
to publish what I have, rather than sit on it.

The patched kernel compiles, but I haven't actually test booted it!

In addition, the cleanup is partial. I believe that they should all
be moving from static net_device structures to using init_etherdev, and
other such changes. I didn't want to get into the realms of such large
scale cleanup.

There are two known ommissions from this patch.

Firstly, none of the PCMCIA drivers are updated. Whereas the standard
net drivers used a "char[] name" member in their private structure for
allocating storage (normally insufficient), the PCMCIA drivers use the
name member for other purposes. It may be that a simple "strcpy" will
suffice, but I'll leave that for now.

Secondly, I haven't fixed the recently introduced lmc wan driver.
This is because it is difficult to do without breaking their conditional
compilation based on kernel version. They also need to fix "Allan Cox"
in their comments :-)

The patch updated 60 files, and can be found at:

    http://www.alfie.demon.co.uk/dev_name-2.3.99-pre6.diff.gz (10804 bytes)

Please give it a try, and see if it works. I may get a chance to do
some testing myself, but my wife has thoughts of decorating :-(

-- 
 `O O'  | Nick.Holloway@alfie.demon.co.uk
// ^ \\ | http://www.alfie.demon.co.uk/

- 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 : Sun Apr 30 2000 - 21:00:16 EST