]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
add path to nvme list
authorTomasz Zawadzki <tomasz.zawadzki@intel.com>
Mon, 29 Jun 2020 13:04:18 +0000 (09:04 -0400)
committerKeith Busch <kbusch@kernel.org>
Thu, 14 Jan 2021 21:50:08 +0000 (14:50 -0700)
commit73a49f3e9933a359f5e77a20bcc733ce7bfcdaf9
tree7d3e1f465612f77790e8a03480069020e766b39b
parent4bdee05e3616d7cde1c9082da03614d4e8d7982d
add path to nvme list

In SPDK project (spdk.io) it is possible to represent
devices using CUSE as character devices in "/dev/spdk/" directory.
No sysfs entries are generated for those devices.

nvme-cli default behavior is to scan the sysfs for entries on
newer kernels. Previously legacy_list() was used to determine
the topology, but that worked only on "/dev/" path.

To enable listing SPDK devices following changes were made:
- pass path parameter to list command
- before checking sysfs, check the path using legacy_list()
- expand arguments of scan_subsystems and related functions to accept the path

Example:
nvme list -d /dev/spdk/

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
fabrics.c
nvme-print.c
nvme-topology.c
nvme.c
nvme.h