Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290795
b: refs/heads/master
c: 95f050b
h: refs/heads/master
i:
  290793: ce6dcd3
  290791: b7ca7ec
v: v3
  • Loading branch information
David S. Miller committed Mar 6, 2012
1 parent e80d366 commit b076464
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 66431a7d4570dbafb5e25c85607779ffa9c4a4bc
refs/heads/master: 95f050bf7f64be5168ae2e2c715bb0b0ded141d1
2 changes: 1 addition & 1 deletion trunk/include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -2122,7 +2122,7 @@ extern int netdev_rx_handler_register(struct net_device *dev,
void *rx_handler_data);
extern void netdev_rx_handler_unregister(struct net_device *dev);

extern int dev_valid_name(const char *name);
extern bool dev_valid_name(const char *name);
extern int dev_ioctl(struct net *net, unsigned int cmd, void __user *);
extern int dev_ethtool(struct net *net, struct ifreq *);
extern unsigned dev_get_flags(const struct net_device *);
Expand Down
12 changes: 6 additions & 6 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,21 +848,21 @@ EXPORT_SYMBOL(dev_get_by_flags_rcu);
* to allow sysfs to work. We also disallow any kind of
* whitespace.
*/
int dev_valid_name(const char *name)
bool dev_valid_name(const char *name)
{
if (*name == '\0')
return 0;
return false;
if (strlen(name) >= IFNAMSIZ)
return 0;
return false;
if (!strcmp(name, ".") || !strcmp(name, ".."))
return 0;
return false;

while (*name) {
if (*name == '/' || isspace(*name))
return 0;
return false;
name++;
}
return 1;
return true;
}
EXPORT_SYMBOL(dev_valid_name);

Expand Down

0 comments on commit b076464

Please sign in to comment.