Skip to content

Commit

Permalink
utils/nvme: Rename logicalPath arg -> device
Browse files Browse the repository at this point in the history
Makes more sense.
  • Loading branch information
mmlb committed May 2, 2024
1 parent 24b989b commit 9dcc9c0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions utils/nvme.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}
Expand Down

0 comments on commit 9dcc9c0

Please sign in to comment.