mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
nvmecontrol: Fix power subcommand output.
The returned value consists of two fields. Report them separately. MFC after: 2 weeks
This commit is contained in:
parent
92a4e8b348
commit
f409f11bc5
|
@ -137,7 +137,8 @@ power_show(int fd)
|
|||
if (nvme_completion_is_error(&pt.cpl))
|
||||
errx(EX_IOERR, "set feature power mgmt request returned error");
|
||||
|
||||
printf("Current Power Mode is %d\n", pt.cpl.cdw0);
|
||||
printf("Current Power State is %d\n", pt.cpl.cdw0 & 0x1F);
|
||||
printf("Current Workload Hint is %d\n", pt.cpl.cdw0 >> 5);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -189,7 +190,7 @@ static const struct opts power_opts[] = {
|
|||
OPT("power", 'p', arg_uint32, opt, power,
|
||||
"Set the power state"),
|
||||
OPT("workload", 'w', arg_uint32, opt, workload,
|
||||
"Set the workload"),
|
||||
"Set the workload hint"),
|
||||
{ NULL, 0, arg_none, NULL, NULL }
|
||||
};
|
||||
#undef OPT
|
||||
|
|
Loading…
Reference in a new issue