From 9dcc9c020fe9eb1ae5efce7fbb48bf52b764127f Mon Sep 17 00:00:00 2001 From: Manuel Mendez Date: Wed, 24 Apr 2024 11:58:59 -0400 Subject: [PATCH] utils/nvme: Rename logicalPath arg -> device Makes more sense. --- utils/nvme.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/utils/nvme.go b/utils/nvme.go index 98233384c..11be25632 100644 --- a/utils/nvme.go +++ b/utils/nvme.go @@ -129,9 +129,9 @@ func (n *Nvme) list(ctx context.Context) ([]byte, error) { return result.Stdout, nil } -func (n *Nvme) cmdListCapabilities(ctx context.Context, logicalPath string) ([]byte, error) { +func (n *Nvme) cmdListCapabilities(ctx context.Context, device string) ([]byte, error) { // nvme id-ctrl --output-format=json devicepath - n.Executor.SetArgs("id-ctrl", "--output-format=json", logicalPath) + n.Executor.SetArgs("id-ctrl", "--output-format=json", device) result, err := n.Executor.Exec(ctx) if err != nil { return nil, err @@ -142,11 +142,11 @@ func (n *Nvme) cmdListCapabilities(ctx context.Context, logicalPath string) ([]b // DriveCapabilities returns the drive capability attributes obtained through nvme // -// The logicalName is the kernel/OS assigned drive name - /dev/nvmeX +// The device is the kernel/OS assigned drive name - /dev/nvmeX // // This method implements the actions.DriveCapabilityCollector interface. -func (n *Nvme) DriveCapabilities(ctx context.Context, logicalName string) ([]*common.Capability, error) { - out, err := n.cmdListCapabilities(ctx, logicalName) +func (n *Nvme) DriveCapabilities(ctx context.Context, device string) ([]*common.Capability, error) { + out, err := n.cmdListCapabilities(ctx, device) if err != nil { return nil, err }