Message ID | 1297248769-28530-1-git-send-email-dfeng@redhat.com |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
From: Xiaotian feng <dfeng@redhat.com> Date: Wed, 9 Feb 2011 18:52:49 +0800 > From: Xiaotian Feng <dfeng@redhat.com> > > commit a512b92 adds sysfs entry for net device group, but > before this commit, tun also uses group sysfs, so after this > commit checkin, kernel warns like this: > sysfs: cannot create duplicate filename '/devices/virtual/net/vnet0/group' > > Since tun has used this for years, rename sysfs under tun might > break existing userspace, so rename group sysfs entry for net device > group is a better choice. > > Signed-off-by: Xiaotian Feng <dfeng@redhat.com> I don't think we have much choice in this matter, so I have applied this patch, thanks! -- 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
On Wed, Feb 09, 2011 at 02:03:23PM -0800, David Miller wrote: > From: Xiaotian feng <dfeng@redhat.com> > Date: Wed, 9 Feb 2011 18:52:49 +0800 > > > From: Xiaotian Feng <dfeng@redhat.com> > > > > commit a512b92 adds sysfs entry for net device group, but > > before this commit, tun also uses group sysfs, so after this > > commit checkin, kernel warns like this: > > sysfs: cannot create duplicate filename '/devices/virtual/net/vnet0/group' > > > > Since tun has used this for years, rename sysfs under tun might > > break existing userspace, so rename group sysfs entry for net device > > group is a better choice. I was not aware of that, sorry for breaking things :) -- 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
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 2e4a393..eb4b5e0 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -295,7 +295,7 @@ static ssize_t show_ifalias(struct device *dev, return ret; } -NETDEVICE_SHOW(group, fmt_dec); +NETDEVICE_SHOW(netdev_group, fmt_dec); static int change_group(struct net_device *net, unsigned long new_group) { @@ -330,7 +330,7 @@ static struct device_attribute net_class_attributes[] = { __ATTR(flags, S_IRUGO | S_IWUSR, show_flags, store_flags), __ATTR(tx_queue_len, S_IRUGO | S_IWUSR, show_tx_queue_len, store_tx_queue_len), - __ATTR(group, S_IRUGO | S_IWUSR, show_group, store_group), + __ATTR(netdev_group, S_IRUGO | S_IWUSR, show_group, store_group), {} };