Skip to content

Commit

Permalink
Remove refactored function
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Young <[email protected]>
  • Loading branch information
Jacob Young committed May 11, 2023
1 parent 5891895 commit e344f1f
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions pkg/net/net_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ func (n *NIC) netDeviceParseEthtool(ctx *context.Context, dev string) {
ctx.Warn(msg)
}


}

// netParseEthtoolFeature parses a line from the ethtool -k output and returns
Expand Down Expand Up @@ -264,24 +263,6 @@ func readFile(path string) string {
return strings.TrimSpace(string(contents))
}

func (nic *NIC) setNicAttrEthtool(ctx *context.Context, dev string) error {
path, _ := exec.LookPath("ethtool")
cmd := exec.Command(path, dev)
var out bytes.Buffer
cmd.Stdout = &out
err := cmd.Run()
if err != nil {
msg := fmt.Sprintf("could not grab NIC link info for %s: %s", dev, err)
ctx.Warn(msg)
return err
}

m := parseNicAttrEthtool(&out)
nic.updateNicAttrEthtool(m)

return nil
}

func autoNegCap(m map[string][]string) *NICCapability {
autoNegotiation := NICCapability{Name: "auto-negotiation", IsEnabled: false, CanEnable: false}

Expand Down

0 comments on commit e344f1f

Please sign in to comment.