]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
Use hex values instead of decimal for flag checking
authorBrandon Paupore <brandon.paupore@wdc.com>
Tue, 31 Aug 2021 15:08:11 +0000 (10:08 -0500)
committerDaniel Wagner <dwagner@suse.de>
Mon, 15 Nov 2021 11:06:29 +0000 (12:06 +0100)
Signed-off-by: Brandon Paupore <brandon.paupore@wdc.com>
nvme.c
plugins/wdc/wdc-nvme.c

diff --git a/nvme.c b/nvme.c
index a7d893f6a4e430cdc116de799cf4ad7597239d69..2c91362f48f20ce7e0a1dc5948c7dfb0ba21dff7 100644 (file)
--- a/nvme.c
+++ b/nvme.c
@@ -479,7 +479,7 @@ static int get_telemetry_log(int argc, char **argv, struct command *cmd, struct
                } else if (err < 0) {
                        perror("get-feature");
                } else {
-                       if ((ctrl.lpa & 64)) {
+                       if ((ctrl.lpa & 0x40)) {
                                if (((unsigned char *)buf)[1] == 1)
                                        total_size = (le32_to_cpu(log->dalb4) * bs) + NVME_LOG_TELEM_BLOCK_SIZE;
                                else {
index 131b2c8f1c2252e5f553d2e1f6323ec3f8d44bb2..5ec575af59bcb38cf61f97b003b0c4789087c50a 100644 (file)
@@ -2096,7 +2096,7 @@ static int wdc_do_cap_telemetry_log(int fd, char *file, __u32 bs, int type, int
                } else if (err < 0) {
                        perror("get-feature");
                } else {
-                       if ((ctrl.lpa & 64)) {
+                       if ((ctrl.lpa & 0x40)) {
                                if (((unsigned char *)buf)[1] == 1)
                                        full_size = (le32_to_cpu(hdr->dalb4) * WDC_TELEMETRY_BLOCK_SIZE) + WDC_TELEMETRY_HEADER_LENGTH;
                                else {