Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111961
b: refs/heads/master
c: cf04a4c
h: refs/heads/master
i:
  111959: f7e8dd6
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Sep 30, 2008
1 parent e5de1e9 commit c523089
Show file tree
Hide file tree
Showing 3 changed files with 7 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: db4148da2cc84c31419b5e3ae3115ac6e11817a1
refs/heads/master: cf04a4c764cd3e651a64b3e667bb6a673ead99e1
4 changes: 2 additions & 2 deletions trunk/include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ 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 *);
extern int dev_change_flags(struct net_device *, unsigned);
extern int dev_change_name(struct net_device *, char *);
extern int dev_change_name(struct net_device *, const char *);
extern int dev_set_alias(struct net_device *, const char *, size_t);
extern int dev_change_net_namespace(struct net_device *,
struct net *, const char *);
Expand Down Expand Up @@ -1670,7 +1670,7 @@ extern void dev_seq_stop(struct seq_file *seq, void *v);
extern int netdev_class_create_file(struct class_attribute *class_attr);
extern void netdev_class_remove_file(struct class_attribute *class_attr);

extern char *netdev_drivername(struct net_device *dev, char *buffer, int len);
extern char *netdev_drivername(const struct net_device *dev, char *buffer, int len);

extern void linkwatch_run_queue(void);

Expand Down
9 changes: 4 additions & 5 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ int dev_alloc_name(struct net_device *dev, const char *name)
* Change name of a device, can pass format strings "eth%d".
* for wildcarding.
*/
int dev_change_name(struct net_device *dev, char *newname)
int dev_change_name(struct net_device *dev, const char *newname)
{
char oldname[IFNAMSIZ];
int err = 0;
Expand All @@ -916,7 +916,6 @@ int dev_change_name(struct net_device *dev, char *newname)
err = dev_alloc_name(dev, newname);
if (err < 0)
return err;
strcpy(newname, dev->name);
}
else if (__dev_get_by_name(net, newname))
return -EEXIST;
Expand Down Expand Up @@ -4754,10 +4753,10 @@ static int __net_init netdev_init(struct net *net)
return -ENOMEM;
}

char *netdev_drivername(struct net_device *dev, char *buffer, int len)
char *netdev_drivername(const struct net_device *dev, char *buffer, int len)
{
struct device_driver *driver;
struct device *parent;
const struct device_driver *driver;
const struct device *parent;

if (len <= 0 || !buffer)
return buffer;
Expand Down

0 comments on commit c523089

Please sign in to comment.