Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 170015
b: refs/heads/master
c: 757010f
h: refs/heads/master
i:
  170013: 221a61f
  170011: b07142a
  170007: 7d27e54
  169999: 065ee7e
  169983: e3df3fc
v: v3
  • Loading branch information
Eric W. Biederman committed Nov 12, 2009
1 parent d656198 commit f4e3176
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 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: 63395b65972c07edce595c9cc8a983016738cdac
refs/heads/master: 757010f026ab3044c594003e216d00a33ed95c56
15 changes: 7 additions & 8 deletions trunk/kernel/sysctl_binary.c
Original file line number Diff line number Diff line change
Expand Up @@ -1269,17 +1269,12 @@ static const struct bin_table *get_sysctl(const int *name, int nlen, char *path)
for ( ; table->convert; table++) {
int len = 0;

/* Use the well known sysctl number to proc name mapping */
if (ctl_name == table->ctl_name) {
len = strlen(table->procname);
memcpy(path, table->procname, len);
}
#ifdef CONFIG_NET
/*
* For a wild card entry map from ifindex to network
* device name.
*/
else if (!table->ctl_name) {
if (!table->ctl_name) {
#ifdef CONFIG_NET
struct net *net = current->nsproxy->net_ns;
struct net_device *dev;
dev = dev_get_by_index(net, ctl_name);
Expand All @@ -1288,8 +1283,12 @@ static const struct bin_table *get_sysctl(const int *name, int nlen, char *path)
memcpy(path, dev->name, len);
dev_put(dev);
}
}
#endif
/* Use the well known sysctl number to proc name mapping */
} else if (ctl_name == table->ctl_name) {
len = strlen(table->procname);
memcpy(path, table->procname, len);
}
if (len) {
path += len;
if (table->child) {
Expand Down

0 comments on commit f4e3176

Please sign in to comment.