diff options
author | Jay Vosburgh <fubar@us.ibm.com> | 2008-01-17 19:25:01 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2008-01-18 14:38:38 -0500 |
commit | ece95f7fefe3afae19e641e1b3f5e64b00d5b948 (patch) | |
tree | ea3846fa640e0c3ed4d4233ac005b653dcf69824 /drivers/net/bonding/bonding.h | |
parent | 3b96c858fcb27120fcba222366180c3293393ccf (diff) |
bonding: Fix up parameter parsing
A recent change to add an additional hash policy modified
bond_parse_parm, but it now does not correctly match parameters passed in
via sysfs.
Rewrote bond_parse_parm to handle (a) parameter matches that
are substrings of one another and (b) user input with whitespace (e.g.,
sysfs input often has a trailing newline).
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/bonding/bonding.h')
-rw-r--r-- | drivers/net/bonding/bonding.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index e1e4734e23ce..6d83be49899a 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h | |||
@@ -141,6 +141,8 @@ struct bond_parm_tbl { | |||
141 | int mode; | 141 | int mode; |
142 | }; | 142 | }; |
143 | 143 | ||
144 | #define BOND_MAX_MODENAME_LEN 20 | ||
145 | |||
144 | struct vlan_entry { | 146 | struct vlan_entry { |
145 | struct list_head vlan_list; | 147 | struct list_head vlan_list; |
146 | __be32 vlan_ip; | 148 | __be32 vlan_ip; |
@@ -314,7 +316,7 @@ void bond_mii_monitor(struct work_struct *); | |||
314 | void bond_loadbalance_arp_mon(struct work_struct *); | 316 | void bond_loadbalance_arp_mon(struct work_struct *); |
315 | void bond_activebackup_arp_mon(struct work_struct *); | 317 | void bond_activebackup_arp_mon(struct work_struct *); |
316 | void bond_set_mode_ops(struct bonding *bond, int mode); | 318 | void bond_set_mode_ops(struct bonding *bond, int mode); |
317 | int bond_parse_parm(char *mode_arg, struct bond_parm_tbl *tbl); | 319 | int bond_parse_parm(const char *mode_arg, struct bond_parm_tbl *tbl); |
318 | void bond_select_active_slave(struct bonding *bond); | 320 | void bond_select_active_slave(struct bonding *bond); |
319 | void bond_change_active_slave(struct bonding *bond, struct slave *new_active); | 321 | void bond_change_active_slave(struct bonding *bond, struct slave *new_active); |
320 | void bond_register_arp(struct bonding *); | 322 | void bond_register_arp(struct bonding *); |