Skip to content

Commit 572e2f5

Browse files
gjoyce-ibmigaw
authored andcommitted
sed: extended discovery feature code printing
Added ability to discover and print details of all specified level 0 features. Signed-off-by: Greg Joyce <[email protected]>
1 parent c6e2b5e commit 572e2f5

4 files changed

Lines changed: 802 additions & 39 deletions

File tree

plugins/sed/sed.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ OPT_ARGS(lock_opts) = {
5050
OPT_END()
5151
};
5252

53+
OPT_ARGS(discovery_opts) = {
54+
OPT_FLAG("verbose", 'v', &sedopal_discovery_verbose,
55+
"Print extended discovery information"),
56+
OPT_FLAG("udev", 'u', &sedopal_discovery_udev,
57+
"Print locking information in form suitable for udev rules"),
58+
OPT_END()
59+
};
60+
5361
/*
5462
* Open the NVMe device specified on the command line. It must be the
5563
* NVMe block device (e.g. /dev/nvme0n1).
@@ -80,7 +88,7 @@ static int sed_opal_discover(int argc, char **argv, struct command *cmd,
8088
const char *desc = "Query SED device and display locking features";
8189
struct nvme_dev *dev;
8290

83-
err = sed_opal_open_device(&dev, argc, argv, desc, no_opts);
91+
err = sed_opal_open_device(&dev, argc, argv, desc, discovery_opts);
8492
if (err)
8593
return err;
8694

0 commit comments

Comments
 (0)