[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1208176322.31695.73.camel@pmac.infradead.org>
Date: Mon, 14 Apr 2008 13:32:02 +0100
From: David Woodhouse <dwmw2@...radead.org>
To: Kay Sievers <kay.sievers@...y.org>
Cc: Marco d'Itri <md@...ux.it>, Harald Hoyer <harald@...hat.com>,
linux-hotplug@...r.kernel.org, netdev@...r.kernel.org,
schwidefsky@...ibm.com
Subject: [PATCH] Expose netdevice dev_id through sysfs
Expose dev_id to userspace, because it helps to disambiguate between
interfaces where the MAC address is unique.
Signed-off-by: David Woodhouse <dwmw2@...radead.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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists