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/