From 2ef0c19b9580e7a94b3cc32e3342cc233aa340ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 22 May 2025 09:21:30 +0000 Subject: [PATCH 1/2] tools: use %lx format for WWPN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use %lx format when printing WWPN data stored in uint64_t variables/members as we are building on 64-bit systems exclusively and uint64_t is "long unsigned int" there. Signed-off-by: Dan Horák --- fc_tools/zfcp_ping.c | 2 +- fc_tools/zfcp_show.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fc_tools/zfcp_ping.c b/fc_tools/zfcp_ping.c index 6da3401..f5213e7 100644 --- a/fc_tools/zfcp_ping.c +++ b/fc_tools/zfcp_ping.c @@ -133,7 +133,7 @@ HBA_STATUS send_fc_ping(struct adapter_attr *aa, char *dest, unsigned int token, } if (display_detail & VERBOSE) - printf("Sending PNG from BUS_ID=0.0.%x WWPN=0x%016llx " + printf("Sending PNG from BUS_ID=0.0.%x WWPN=0x%016lx " "ID=0x%x dev=%s speed=%s\n", aa->bus_id, aa->wwpn, aa->d_id, aa->dev_name, speed[aa->speed]); else diff --git a/fc_tools/zfcp_show.c b/fc_tools/zfcp_show.c index ebd5733..1adab30 100644 --- a/fc_tools/zfcp_show.c +++ b/fc_tools/zfcp_show.c @@ -736,7 +736,7 @@ int main(int argc, char *argv[]) { if (aa) { if (display_detail & VERBOSE) printf("Using adapter BUS_ID 0.0.%x\n" - " Name 0x%016llx\n" + " Name 0x%016lx\n" " N_Port_ID 0x%x\n" " OS-Device %s\n" " Speed %s\n", From b9aff7b39cc20e991a6a5b10e501b2c27b5df653 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 22 May 2025 09:55:02 +0000 Subject: [PATCH 2/2] tools: typecast temp variable to uint32_t MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Typecast the temp dest_val variable to uint32_t to match the data in it before printing. Signed-off-by: Dan Horák --- fc_tools/zfcp_ping.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fc_tools/zfcp_ping.c b/fc_tools/zfcp_ping.c index f5213e7..0abafad 100644 --- a/fc_tools/zfcp_ping.c +++ b/fc_tools/zfcp_ping.c @@ -180,7 +180,8 @@ HBA_STATUS send_fc_ping(struct adapter_attr *aa, char *dest, unsigned int token, (*tp)++, update_ts(&start, &end)); else printf("\techo received from D_ID (0x%x) " - "tok=%d time=%0.03f ms\n", dest_val, + "tok=%d time=%0.03f ms\n", + (uint32_t)dest_val, (*tp)++, update_ts(&start, &end)); sleep(1); count--;