Skip to content

Commit

Permalink
sed: extended discovery feature code printing
Browse files Browse the repository at this point in the history
Added ability to discover and print details of all specified
level 0 features.

Signed-off-by: Greg Joyce <[email protected]>
  • Loading branch information
gjoyce-ibm committed Feb 25, 2025
1 parent 8ff23ab commit db6b0b8
Show file tree
Hide file tree
Showing 4 changed files with 798 additions and 35 deletions.
10 changes: 9 additions & 1 deletion plugins/sed/sed.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ OPT_ARGS(lock_opts) = {
OPT_END()
};

OPT_ARGS(discovery_opts) = {
OPT_FLAG("verbose", 'v', &sedopal_discovery_verbose,
"Print extended discovery information"),
OPT_FLAG("udev", 'u', &sedopal_discovery_udev,
"Print locking information in form suitable for udev rules"),
OPT_END()
};

/*
* Open the NVMe device specified on the command line. It must be the
* NVMe block device (e.g. /dev/nvme0n1).
Expand Down Expand Up @@ -80,7 +88,7 @@ static int sed_opal_discover(int argc, char **argv, struct command *cmd,
const char *desc = "Query SED device and display locking features";
struct nvme_dev *dev;

err = sed_opal_open_device(&dev, argc, argv, desc, no_opts);
err = sed_opal_open_device(&dev, argc, argv, desc, discovery_opts);
if (err)
return err;

Expand Down
Loading

0 comments on commit db6b0b8

Please sign in to comment.