]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
nvme-cli: Add routine to search for controller with specific attributes
authorJames Smart <jsmart2021@gmail.com>
Thu, 1 Aug 2019 23:13:45 +0000 (16:13 -0700)
committerKeith Busch <kbusch@kernel.org>
Fri, 2 Aug 2019 15:43:06 +0000 (09:43 -0600)
commit035314a35f3a95f36f3f34a4d7928a3bd31a871e
treee11e567fef2da8f06b5058e018a3b096243c0843
parentd302047278b4b465ce3a6b7ba76d20e72d6bf4bc
nvme-cli: Add routine to search for controller with specific attributes

In preparation for searching controllers to match with connect args:

Create a new routine find_ctrl_with_connectargs() that will search the
controllers that exist in the system to find one that has attributes
that match the connect arguments specified.  If found, the routine
returns the controller name ("nvme?"). If not found, a NULL is returned.

Routine is defined as a global as a subsequent patch will use it
from the fabrics routines.

Signed-off-by: James Smart <jsmart2021@gmail.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Hannes Reinecke <hare@suse.com>
nvme.c
nvme.h