Re: [BK PATCH] PCI and sysfs fixes for 2.5.73

Dan Aloni (da-x@gmx.net)
Fri, 4 Jul 2003 09:52:17 +0300


On Thu, Jul 03, 2003 at 07:06:34PM -0700, Greg KH wrote:
> Hi,
>
> Here's some PCI and sysfs fixes that are against the latest 2.5.74 bk
> tree. They include Matthew Wilcox's set of pci cleanups, and sysfs
> fixes for binary files. That led into my sysfs attribute file change,
> which required John Stultz's timer build fix. I've also added the
> sysfs/kobject/class rename patches based on previously posted patches.

That's good, but I see that you didn't add the call to class_device_rename()
in net/core/dev.c, and that's kinda misses the point ;)

--- linux/net/core/dev.c 2003-06-29 22:16:29.000000000 +0300
+++ linux/net/core/dev.c 2003-06-30 20:57:55.000000000 +0300
@@ -2346,10 +2346,14 @@
return -EEXIST;
memcpy(dev->name, ifr->ifr_newname, IFNAMSIZ);
dev->name[IFNAMSIZ - 1] = 0;
- strlcpy(dev->class_dev.class_id, dev->name, BUS_ID_SIZE);
+
+ err = class_device_rename(&dev->class_dev, dev->name);
+ if (err)
+ printk(KERN_DEBUG "SIOCSIFNAME: error renaming class_device (%d)\n", err);
+
notifier_call_chain(&netdev_chain,
NETDEV_CHANGENAME, dev);
- return 0;
+ return err;

/*
* Unknown or private ioctl

-- 
Dan Aloni
da-x@gmx.net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/