]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
Show help for get-ns-id
authorKeith Busch <keith.busch@intel.com>
Tue, 27 Jun 2017 20:25:16 +0000 (16:25 -0400)
committerKeith Busch <keith.busch@intel.com>
Tue, 27 Jun 2017 20:26:50 +0000 (16:26 -0400)
https://github.com/linux-nvme/nvme-cli/pull/196

Signed-off-by: Keith Busch <keith.busch@intel.com>
nvme.c

diff --git a/nvme.c b/nvme.c
index 6a5449848957a00d4aef1869b6d7342f00fef7e7..62ddd17f615eb6c6312ef10fcffdc9b035994fbb 100644 (file)
--- a/nvme.c
+++ b/nvme.c
@@ -1094,8 +1094,13 @@ static int id_ns(int argc, char **argv, struct command *cmd, struct plugin *plug
 static int get_ns_id(int argc, char **argv, struct command *cmd, struct plugin *plugin)
 {
        int nsid, fd;
+       const char *desc = "Get namespce ID of a the block device.";
 
-       fd = get_dev(argc, argv);
+       const struct argconfig_commandline_options command_line_options[] = {
+               {NULL},
+       };
+
+       fd = parse_and_open(argc, argv, desc, command_line_options, NULL, 0);
        if (fd < 0)
                return fd;
        nsid = nvme_get_nsid(fd);