Skip to content

Commit f84546c

Browse files
author
Jacob Young
committed
Remove refactored function
Signed-off-by: Jacob Young <jacoby@nvidia.com>
1 parent b4052de commit f84546c

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

pkg/net/net_linux.go

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ func (n *NIC) netDeviceParseEthtool(ctx *context.Context, dev string) {
174174
ctx.Warn(msg)
175175
}
176176

177-
178177
}
179178

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

267-
func (nic *NIC) setNicAttrEthtool(ctx *context.Context, dev string) error {
268-
path, _ := exec.LookPath("ethtool")
269-
cmd := exec.Command(path, dev)
270-
var out bytes.Buffer
271-
cmd.Stdout = &out
272-
err := cmd.Run()
273-
if err != nil {
274-
msg := fmt.Sprintf("could not grab NIC link info for %s: %s", dev, err)
275-
ctx.Warn(msg)
276-
return err
277-
}
278-
279-
m := parseNicAttrEthtool(&out)
280-
nic.updateNicAttrEthtool(m)
281-
282-
return nil
283-
}
284-
285266
func autoNegCap(m map[string][]string) *NICCapability {
286267
autoNegotiation := NICCapability{Name: "auto-negotiation", IsEnabled: false, CanEnable: false}
287268

0 commit comments

Comments
 (0)