aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2026-02-03 17:34:36 +0000
committerWarner Losh <imp@FreeBSD.org>2026-02-03 17:34:36 +0000
commitcbb7441245cf2b22efed17dec3c88587c980c691 (patch)
tree52db5ebcf435b5fe563f0adffb016cdbc6fbf4d1
parenta4f0e93c514280bfd0ff3897e5171ec7bbe4796b (diff)
nvmecontrol: Pass 1 to uint8_t arg
The rae arg is uint8_t (which we then shift over to the right bit. Pass '1' instead of 'true' here to match the interface. While true is promoted to (uint8_t)1, we don't use it as a bool in read_logpage(). Fixes: 5322eec86ae4 ("nvmecontrol: Always set the RAE bit on telemetry-log requests") Sponsored by: Netflix Reviewed by: chs Differential Revision: https://reviews.freebsd.org/D55060
-rw-r--r--sbin/nvmecontrol/telemetry.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/nvmecontrol/telemetry.c b/sbin/nvmecontrol/telemetry.c
index 60bd3e025f3d..2561d7dff20d 100644
--- a/sbin/nvmecontrol/telemetry.c
+++ b/sbin/nvmecontrol/telemetry.c
@@ -139,7 +139,7 @@ telemetry_log(const struct cmd *f, int argc, char *argv[])
/* Read the log page */
size = sizeof(tlp);
off = 0;
- read_logpage(fd, NVME_LOG_TELEMETRY_HOST_INITIATED, nsid, 0, 0, true,
+ read_logpage(fd, NVME_LOG_TELEMETRY_HOST_INITIATED, nsid, 0, 0, 1,
off, 0, 0, 0, &tlp, size);
switch(opt.da) {
case 1:
@@ -171,7 +171,7 @@ telemetry_log(const struct cmd *f, int argc, char *argv[])
(unsigned long long)blocks);
fflush(stdout);
}
- read_logpage(fd, NVME_LOG_TELEMETRY_HOST_INITIATED, nsid, 0, 0, true,
+ read_logpage(fd, NVME_LOG_TELEMETRY_HOST_INITIATED, nsid, 0, 0, 1,
off, 0, 0, 0, &buf, chunk);
if (write(fdout, &buf, chunk) != chunk)
err(EX_IOERR, "Error writing %s", opt.outfn);