--------
[verse]
'nvme smart-log' <device> [--namespace-id=<nsid> | -n <nsid>]
- [--raw-binary | -b] [--fahrenheit | -f]
+ [--raw-binary | -b]
[--output-format=<fmt> | -o <fmt>] [--verbose | -v]
DESCRIPTION
--raw-binary::
Print the raw SMART log buffer to stdout.
--f::
---fahrenheit::
- Print the temperatures in degrees fahrenheit.
-
-o <fmt>::
--output-format=<fmt>::
Set the reporting format to 'normal', 'json' or 'binary'. Only one
-b':alias to --raw-binary'
--verbose':show infos verbosely'
-v':alias to --verbose'
- --fahrenheit'show temperatures in degrees fahrenheit'
- -f':alias to --fahrenheit'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme smart-log options" _smartlog
static const char *dry = "show command instead of sending";
static const char *dspec_w_dtype = "directive specification associated with directive type";
static const char *dtype = "directive type";
-static const char *fahrenheit = "show temperatures in degrees fahrenheit";
static const char *force_unit_access = "force device to commit data before command completes";
static const char *human_readable_directive = "show directive in readable format";
static const char *human_readable_identify = "show identify in readable format";
__u32 namespace_id;
bool raw_binary;
bool human_readable;
- bool fahrenheit;
};
struct config cfg = {
NVME_ARGS(opts,
OPT_UINT("namespace-id", 'n', &cfg.namespace_id, namespace),
OPT_FLAG("raw-binary", 'b', &cfg.raw_binary, raw_output),
- OPT_FLAG("human-readable", 'H', &cfg.human_readable, human_readable_info),
- OPT_FLAG("fahrenheit", 'f', &cfg.fahrenheit, fahrenheit));
+ OPT_FLAG("human-readable", 'H', &cfg.human_readable, human_readable_info));
err = parse_and_open(&dev, argc, argv, desc, opts);
if (err)
if (cfg.human_readable)
flags |= VERBOSE;
- if (cfg.fahrenheit)
- flags |= FAHRENHEIT;
-
smart_log = nvme_alloc(sizeof(*smart_log));
if (!smart_log)
return -ENOMEM;
JSON = 1 << 1, /* display in json format */
VS = 1 << 2, /* hex dump vendor specific data areas */
BINARY = 1 << 3, /* binary dump raw bytes */
- FAHRENHEIT = 1 << 4, /* show temperatures in degrees fahrenheit */
};
typedef uint32_t nvme_print_flags_t;