[verse]
'nvme get-log' <device> [--log-id=<log-id> | -i <log-id>]
[--log-len=<log-len> | -l <log-len>]
+ [--aen=<aen> | -a <aen>]
[--namespace-id=<nsid> | -n <nsid>]
[--raw-binary | -b]
--log-id=<log-id>::
Sets the commands requested log-id to <log-id>. Defaults to 0.
+-a <aen>::
+--aen=<aen>::
+ Convenience field for extracting log information based on an
+ asynchronous event notification result. This will override log-id and
+ log-len, if set.
+
-n <nsid>::
--namespace-id=<nsid>::
Sets the command's nsid value to the given nsid. Defaults to
const char *namespace_id = "desired namespace";
const char *log_id = "identifier of log to retrieve";
const char *log_len = "how many bytes to retrieve";
+ const char *aen = "result of the aen, use to override log id";
const char *raw_binary = "output in raw format";
int err, fd;
__u32 namespace_id;
__u32 log_id;
__u32 log_len;
+ __u32 aen;
int raw_binary;
};
{"namespace-id", 'n', "NUM", CFG_POSITIVE, &cfg.namespace_id, required_argument, namespace_id},
{"log-id", 'i', "NUM", CFG_POSITIVE, &cfg.log_id, required_argument, log_id},
{"log-len", 'l', "NUM", CFG_POSITIVE, &cfg.log_len, required_argument, log_len},
+ {"aen", 'a', "NUM", CFG_POSITIVE, &cfg.aen, required_argument, aen},
{"raw-binary", 'b', "", CFG_NONE, &cfg.raw_binary, no_argument, raw_binary},
{NULL}
};
if (fd < 0)
return fd;
+ if (cfg.aen) {
+ cfg.log_len = 4096;
+ cfg.log_id = (cfg.aen >> 16) & 0xff;
+ }
+
if (!cfg.log_len) {
fprintf(stderr, "non-zero log-len is required param\n");
return EINVAL;