libmultipath: add wrapper library for nvme ioctls
authorMartin Wilck <mwilck@suse.com>
Sun, 23 Dec 2018 22:21:19 +0000 (23:21 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Mon, 7 Jan 2019 10:46:34 +0000 (11:46 +0100)
commit17c71c79e276e14c4b7ed06b8ee4c5cf6a944c4e
tree70c3c1b013bc39472d9100ef459fd11f9afdc321
parentf33eec17a2019dacdcd4d25bebe5e3e373b66a52
libmultipath: add wrapper library for nvme ioctls

Create a small wrapper around the code from nvme-cli provide
the necessary functionality (and only that) for libmultipath.

libmultipath code should include "nvme-lib.h" and possibly
"nvme.h" (the latter with -Invme"). The nvme-cli code is
rewritten, changing all functions to static linkage, and
included by nvme-lib.c, so that only those functions that
are actually exported via nvme-lib.c become part of
libmultipath.

This allows us to include the nvme-cli code without modifications,
and at the same time not carry around binary code for stuff we
don't need.

When additional functionality from nvme-cli is needed, more
wrappers need to be added to nvme-lib.[hc].

Cc: lijie <lijie34@huawei.com>
Signed-off-by: Martin Wilck <mwilck@suse.com>
libmultipath/Makefile
libmultipath/nvme-lib.c [new file with mode: 0644]
libmultipath/nvme-lib.h [new file with mode: 0644]