Skip to content

Commit 0a19628

Browse files
committed
Add structures for interface bonding information
Update net_class.go with new structures to handle bonding driver information Add new true/false values to internal.util.parse.ParseBool References: torvalds/linux/drivers/net/bonding/bond_sysfs.c torvalds/linux/drivers/net/bonding/bond_sysfs_slave.c torvalds/linux/include/net/bonding.h torvalds/linux/include/net/bond_options.h torvalds/linux/include/net/bond_3ad.h Signed-off-by: Brandon Ewing <[email protected]>
1 parent 5f46783 commit 0a19628

File tree

2 files changed

+320
-35
lines changed

2 files changed

+320
-35
lines changed

internal/util/parse.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ func ReadIntFromFile(path string) (int64, error) {
8686
func ParseBool(b string) *bool {
8787
var truth bool
8888
switch b {
89-
case "enabled":
89+
case "enabled", "up", "1":
9090
truth = true
91-
case "disabled":
91+
case "disabled", "down", "0":
9292
truth = false
9393
default:
9494
return nil

0 commit comments

Comments
 (0)