diff options
author | David Woodhouse <dwmw2@infradead.org> | 2008-04-20 19:07:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-20 19:07:43 -0400 |
commit | 9d29672c64505f2d7f707701b829715705308a69 (patch) | |
tree | 8a62c799b03820930b756c0d867b480386cb2d2f /net | |
parent | f7d0e5a506396419eb731b6c6cd97ed23c9245c7 (diff) |
[NET]: Expose netdevice dev_id through sysfs
Expose dev_id to userspace, because it helps to disambiguate between
interfaces where the MAC address is unique.
This should allow us to simplify the handling of persistent naming for
S390 network devices in udev -- because it can depend on a simple
attribute of the device like the other match criteria, rather than
having a special case for SUBSYSTEMS=="ccwgroup".
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/net-sysfs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 7635d3f72723..4e7b847347f7 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c | |||
@@ -87,6 +87,7 @@ static ssize_t netdev_store(struct device *dev, struct device_attribute *attr, | |||
87 | return ret; | 87 | return ret; |
88 | } | 88 | } |
89 | 89 | ||
90 | NETDEVICE_SHOW(dev_id, fmt_hex); | ||
90 | NETDEVICE_SHOW(addr_len, fmt_dec); | 91 | NETDEVICE_SHOW(addr_len, fmt_dec); |
91 | NETDEVICE_SHOW(iflink, fmt_dec); | 92 | NETDEVICE_SHOW(iflink, fmt_dec); |
92 | NETDEVICE_SHOW(ifindex, fmt_dec); | 93 | NETDEVICE_SHOW(ifindex, fmt_dec); |
@@ -210,6 +211,7 @@ static ssize_t store_tx_queue_len(struct device *dev, | |||
210 | 211 | ||
211 | static struct device_attribute net_class_attributes[] = { | 212 | static struct device_attribute net_class_attributes[] = { |
212 | __ATTR(addr_len, S_IRUGO, show_addr_len, NULL), | 213 | __ATTR(addr_len, S_IRUGO, show_addr_len, NULL), |
214 | __ATTR(dev_id, S_IRUGO, show_dev_id, NULL), | ||
213 | __ATTR(iflink, S_IRUGO, show_iflink, NULL), | 215 | __ATTR(iflink, S_IRUGO, show_iflink, NULL), |
214 | __ATTR(ifindex, S_IRUGO, show_ifindex, NULL), | 216 | __ATTR(ifindex, S_IRUGO, show_ifindex, NULL), |
215 | __ATTR(features, S_IRUGO, show_features, NULL), | 217 | __ATTR(features, S_IRUGO, show_features, NULL), |