Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82665
b: refs/heads/master
c: a42e534
h: refs/heads/master
i:
  82663: 6c6bfaa
v: v3
  • Loading branch information
Jay Vosburgh authored and David S. Miller committed Feb 3, 2008
1 parent 5430f40 commit a377d14
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 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: c800c5c9db9c621b2c1d70c3ae6532fafe2db69d
refs/heads/master: a42e534f1b6be7f2f68f83d29588c3f2736b4d25
17 changes: 11 additions & 6 deletions trunk/drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4549,14 +4549,19 @@ static void bond_free_all(void)
int bond_parse_parm(const char *buf, struct bond_parm_tbl *tbl)
{
int mode = -1, i, rv;
char modestr[BOND_MAX_MODENAME_LEN + 1] = { 0, };
char *p, modestr[BOND_MAX_MODENAME_LEN + 1] = { 0, };

rv = sscanf(buf, "%d", &mode);
if (!rv) {
for (p = (char *)buf; *p; p++)
if (!(isdigit(*p) || isspace(*p)))
break;

if (*p)
rv = sscanf(buf, "%20s", modestr);
if (!rv)
return -1;
}
else
rv = sscanf(buf, "%d", &mode);

if (!rv)
return -1;

for (i = 0; tbl[i].modename; i++) {
if (mode == tbl[i].mode)
Expand Down

0 comments on commit a377d14

Please sign in to comment.