login
Header Space

 
 

[PATCH] Expose netdevice dev_id through sysfs

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Kay Sievers <kay.sievers@...>
Cc: Marco d'Itri <md@...>, Harald Hoyer <harald@...>, <linux-hotplug@...>, <netdev@...>, <schwidefsky@...>
Date: Monday, April 14, 2008 - 8:32 am

Expose dev_id to userspace, because it helps to disambiguate between
interfaces where the MAC address is unique.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>

--- ./linux-2.6.24.ppc/net/core/net-sysfs.c~	2008-04-13 13:38:24.000000000 +0100
+++ ./linux-2.6.24.ppc/net/core/net-sysfs.c	2008-04-14 10:58:32.000000000 +0100
@@ -87,6 +87,7 @@ static ssize_t netdev_store(struct devic
 	return ret;
 }
 
+NETDEVICE_SHOW(dev_id, fmt_hex);
 NETDEVICE_SHOW(addr_len, fmt_dec);
 NETDEVICE_SHOW(iflink, fmt_dec);
 NETDEVICE_SHOW(ifindex, fmt_dec);
@@ -210,6 +211,7 @@ static ssize_t store_tx_queue_len(struct
 
 static struct device_attribute net_class_attributes[] = {
 	__ATTR(addr_len, S_IRUGO, show_addr_len, NULL),
+	__ATTR(dev_id, S_IRUGO, show_dev_id, NULL),
 	__ATTR(iflink, S_IRUGO, show_iflink, NULL),
 	__ATTR(ifindex, S_IRUGO, show_ifindex, NULL),
 	__ATTR(features, S_IRUGO, show_features, NULL),


-- 
dwmw2

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: udev can't name PS3's network devices correctly, David Woodhouse, (Mon Apr 14, 6:08 am)
Re: udev can't name PS3's network devices correctly, Marco d'Itri, (Mon Apr 14, 8:51 am)
Re: udev can't name PS3's network devices correctly, David Woodhouse, (Mon Apr 14, 9:38 am)
Re: udev can't name PS3's network devices correctly, Kay Sievers, (Mon Apr 14, 8:03 am)
Re: udev can't name PS3's network devices correctly, David Woodhouse, (Mon Apr 14, 8:19 am)
Re: udev can't name PS3's network devices correctly, Kay Sievers, (Mon Apr 14, 8:52 am)
Re: udev can't name PS3's network devices correctly, David Woodhouse, (Mon Apr 14, 9:16 am)
Re: udev can't name PS3's network devices correctly, David Woodhouse, (Mon Apr 14, 7:11 am)
Re: udev can't name PS3's network devices correctly, Kay Sievers, (Mon Apr 14, 7:55 am)
Re: udev can't name PS3's network devices correctly, David Woodhouse, (Sun Apr 27, 1:37 pm)
Re: udev can't name PS3's network devices correctly, Kay Sievers, (Sun Apr 27, 2:28 pm)
[PATCH] Expose netdevice dev_id through sysfs, David Woodhouse, (Sun Apr 20, 7:22 am)
[PATCH] Expose netdevice dev_id through sysfs, David Woodhouse, (Mon Apr 14, 8:32 am)
Re: [PATCH] Expose netdevice dev_id through sysfs, David Miller, (Sat Apr 19, 9:33 pm)
Re: [PATCH] Expose netdevice dev_id through sysfs, David Woodhouse, (Sun Apr 20, 6:50 am)
Re: [PATCH] Expose netdevice dev_id through sysfs, David Miller, (Sun Apr 20, 6:55 am)
Re: [PATCH] Expose netdevice dev_id through sysfs, David Woodhouse, (Sun Apr 20, 7:12 am)
Re: [PATCH] Expose netdevice dev_id through sysfs, David Miller, (Sun Apr 20, 7:14 am)
Re: [PATCH] Expose netdevice dev_id through sysfs, Andrey Borzenkov, (Sun Apr 20, 1:21 am)
Re: [PATCH] Expose netdevice dev_id through sysfs, David Miller, (Sun Apr 20, 1:32 am)
speck-geostationary