提交 c2373ee9 编写于 作者: M Mitch Williams 提交者: John W. Linville

[PATCH] net: make dev_valid_name public

dev_valid_name() is a useful function.  Make it public.
Signed-off-by: NMitch Williams <mitch.a.williams@intel.com>
Acked-by: NJay Vosburgh <fubar@us.ibm.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 1e2e5659
...@@ -684,6 +684,7 @@ extern int netif_rx(struct sk_buff *skb); ...@@ -684,6 +684,7 @@ extern int netif_rx(struct sk_buff *skb);
extern int netif_rx_ni(struct sk_buff *skb); extern int netif_rx_ni(struct sk_buff *skb);
#define HAVE_NETIF_RECEIVE_SKB 1 #define HAVE_NETIF_RECEIVE_SKB 1
extern int netif_receive_skb(struct sk_buff *skb); extern int netif_receive_skb(struct sk_buff *skb);
extern int dev_valid_name(const char *name);
extern int dev_ioctl(unsigned int cmd, void __user *); extern int dev_ioctl(unsigned int cmd, void __user *);
extern int dev_ethtool(struct ifreq *); extern int dev_ethtool(struct ifreq *);
extern unsigned dev_get_flags(const struct net_device *); extern unsigned dev_get_flags(const struct net_device *);
......
...@@ -626,7 +626,7 @@ struct net_device * dev_get_by_flags(unsigned short if_flags, unsigned short mas ...@@ -626,7 +626,7 @@ struct net_device * dev_get_by_flags(unsigned short if_flags, unsigned short mas
* Network device names need to be valid file names to * Network device names need to be valid file names to
* to allow sysfs to work * to allow sysfs to work
*/ */
static int dev_valid_name(const char *name) int dev_valid_name(const char *name)
{ {
return !(*name == '\0' return !(*name == '\0'
|| !strcmp(name, ".") || !strcmp(name, ".")
...@@ -3269,6 +3269,7 @@ EXPORT_SYMBOL(__dev_get_by_index); ...@@ -3269,6 +3269,7 @@ EXPORT_SYMBOL(__dev_get_by_index);
EXPORT_SYMBOL(__dev_get_by_name); EXPORT_SYMBOL(__dev_get_by_name);
EXPORT_SYMBOL(__dev_remove_pack); EXPORT_SYMBOL(__dev_remove_pack);
EXPORT_SYMBOL(__skb_linearize); EXPORT_SYMBOL(__skb_linearize);
EXPORT_SYMBOL(dev_valid_name);
EXPORT_SYMBOL(dev_add_pack); EXPORT_SYMBOL(dev_add_pack);
EXPORT_SYMBOL(dev_alloc_name); EXPORT_SYMBOL(dev_alloc_name);
EXPORT_SYMBOL(dev_close); EXPORT_SYMBOL(dev_close);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册