|
|
c8a6c8 |
diff --git a/fcnsq.c b/fcnsq.c
|
|
|
c8a6c8 |
index 45dff40..c5b78b9 100644
|
|
|
c8a6c8 |
--- a/fcnsq.c
|
|
|
c8a6c8 |
+++ b/fcnsq.c
|
|
|
c8a6c8 |
@@ -24,6 +24,7 @@
|
|
|
c8a6c8 |
#include <stdarg.h>
|
|
|
c8a6c8 |
#include <stdbool.h>
|
|
|
c8a6c8 |
#include <unistd.h>
|
|
|
c8a6c8 |
+#include <inttypes.h>
|
|
|
c8a6c8 |
#include <string.h>
|
|
|
c8a6c8 |
#include <errno.h>
|
|
|
c8a6c8 |
#include <fcntl.h>
|
|
|
c8a6c8 |
@@ -227,7 +228,7 @@ static int gpn_id(int bsg, u32 fcid)
|
|
|
c8a6c8 |
rjt = gn_id(bsg, fcid, FC_NS_GPN_ID, &wwpn);
|
|
|
c8a6c8 |
if (rjt)
|
|
|
c8a6c8 |
goto fail;
|
|
|
c8a6c8 |
- print_result("Port Name", "%16.16llx\n", wwpn);
|
|
|
c8a6c8 |
+ print_result("Port Name", "%16.16jx\n", (uintmax_t)wwpn);
|
|
|
c8a6c8 |
return 0;
|
|
|
c8a6c8 |
fail:
|
|
|
c8a6c8 |
if (rjt == (u16) ~0)
|
|
|
c8a6c8 |
@@ -248,7 +249,7 @@ static int gnn_id(int bsg, u32 fcid)
|
|
|
c8a6c8 |
rjt = gn_id(bsg, fcid, FC_NS_GNN_ID, &wwnn);
|
|
|
c8a6c8 |
if (rjt)
|
|
|
c8a6c8 |
goto fail;
|
|
|
c8a6c8 |
- print_result("Node Name", "%16.16llx\n", wwnn);
|
|
|
c8a6c8 |
+ print_result("Node Name", "%16.16jx\n", (uintmax_t)wwnn);
|
|
|
c8a6c8 |
return 0;
|
|
|
c8a6c8 |
fail:
|
|
|
c8a6c8 |
if (rjt == (u16) ~0)
|
|
|
c8a6c8 |
@@ -373,11 +374,12 @@ int main(int argc, char *argv[])
|
|
|
c8a6c8 |
{
|
|
|
c8a6c8 |
char *bsg;
|
|
|
c8a6c8 |
int bsg_dev;
|
|
|
c8a6c8 |
- u32 port_id;
|
|
|
c8a6c8 |
- u64 wwnn;
|
|
|
c8a6c8 |
+ u32 port_id = 0;
|
|
|
c8a6c8 |
+ u64 wwnn = 0;
|
|
|
c8a6c8 |
int rc = 0;
|
|
|
c8a6c8 |
enum commands cmd = 0;
|
|
|
c8a6c8 |
char c;
|
|
|
c8a6c8 |
+ uintmax_t wwnn_tmp = 0;
|
|
|
c8a6c8 |
|
|
|
c8a6c8 |
while(1) {
|
|
|
c8a6c8 |
c = getopt_long_only(argc, argv, "", options, NULL);
|
|
|
c8a6c8 |
@@ -402,7 +404,8 @@ int main(int argc, char *argv[])
|
|
|
c8a6c8 |
if (cmd)
|
|
|
c8a6c8 |
help(-1);
|
|
|
c8a6c8 |
cmd = c;
|
|
|
c8a6c8 |
- sscanf(optarg, "%llx", &wwnn);
|
|
|
c8a6c8 |
+ sscanf(optarg, "%jx", &wwnn_tmp);
|
|
|
c8a6c8 |
+ wwnn = (u64)wwnn_tmp;
|
|
|
c8a6c8 |
break;
|
|
|
c8a6c8 |
}
|
|
|
c8a6c8 |
}
|
|
|
c8a6c8 |
diff --git a/fcoeadm_display.c b/fcoeadm_display.c
|
|
|
c8a6c8 |
index e1cbd48..a6cf7a3 100644
|
|
|
c8a6c8 |
--- a/fcoeadm_display.c
|
|
|
c8a6c8 |
+++ b/fcoeadm_display.c
|
|
|
c8a6c8 |
@@ -1426,8 +1426,8 @@ void print_fcoe_fcf_device(void *ep, void *arg)
|
|
|
c8a6c8 |
if (!buf)
|
|
|
c8a6c8 |
buf = temp;
|
|
|
c8a6c8 |
printf(" Connection Mode: %s\n", buf);
|
|
|
c8a6c8 |
- printf(" Fabric Name: 0x%016lx\n", fcf->fabric_name);
|
|
|
c8a6c8 |
- printf(" Switch Name 0x%016lx\n", fcf->switch_name);
|
|
|
c8a6c8 |
+ printf(" Fabric Name: 0x%016" PRIx64 "\n", fcf->fabric_name);
|
|
|
c8a6c8 |
+ printf(" Switch Name 0x%016" PRIx64 "\n", fcf->switch_name);
|
|
|
c8a6c8 |
mac2str(fcf->mac, mac, MAX_STR_LEN);
|
|
|
c8a6c8 |
printf(" MAC Address: %s\n", mac);
|
|
|
c8a6c8 |
printf(" FCF Priority: %u\n", fcf->priority);
|
|
|
c8a6c8 |
diff --git a/fcoemon.c b/fcoemon.c
|
|
|
c8a6c8 |
index 80360fd..23fae9e 100644
|
|
|
c8a6c8 |
--- a/fcoemon.c
|
|
|
c8a6c8 |
+++ b/fcoemon.c
|
|
|
c8a6c8 |
@@ -2640,7 +2640,7 @@ static void fcm_dcbd_get_oper(struct fcm_netif *ff, char *resp, char *cp)
|
|
|
c8a6c8 |
|
|
|
c8a6c8 |
if (ep) {
|
|
|
c8a6c8 |
FCM_LOG_DEV(ff, "Invalid get oper response "
|
|
|
c8a6c8 |
- "parse error byte %ld, resp %s", ep - cp, cp);
|
|
|
c8a6c8 |
+ "parse error byte %td, resp %s", ep - cp, cp);
|
|
|
c8a6c8 |
fcm_dcbd_state_set(ff, FCD_ERROR);
|
|
|
c8a6c8 |
} else {
|
|
|
c8a6c8 |
if (val && fcoe_config.debug)
|
|
|
c8a6c8 |
diff --git a/fcping.c b/fcping.c
|
|
|
c8a6c8 |
index bc51d5f..f92516f 100644
|
|
|
c8a6c8 |
--- a/fcping.c
|
|
|
c8a6c8 |
+++ b/fcping.c
|
|
|
c8a6c8 |
@@ -25,6 +25,7 @@
|
|
|
c8a6c8 |
#include <stddef.h>
|
|
|
c8a6c8 |
#include <stdarg.h>
|
|
|
c8a6c8 |
#include <unistd.h>
|
|
|
c8a6c8 |
+#include <inttypes.h>
|
|
|
c8a6c8 |
#include <errno.h>
|
|
|
c8a6c8 |
#include <string.h>
|
|
|
c8a6c8 |
#include <time.h>
|
|
|
c8a6c8 |
@@ -812,17 +813,17 @@ static void fp_check_data_len()
|
|
|
c8a6c8 |
printf("Maximum ECHO data allowed by the Fabric (0x%06x) : %d bytes.\n"
|
|
|
c8a6c8 |
"Maximum ECHO data allowed by the Source (0x%06x) : %d bytes.\n"
|
|
|
c8a6c8 |
"Maximum ECHO data allowed by the Target (0x%06x) : %d bytes.\n"
|
|
|
c8a6c8 |
- "Maximum ECHO data requested from user input (-s) : %lu "
|
|
|
c8a6c8 |
+ "Maximum ECHO data requested from user input (-s) : %" PRIu32 " "
|
|
|
c8a6c8 |
"(default %d) bytes.\n",
|
|
|
c8a6c8 |
FC_WKA_FABRIC_CONTROLLER, flen, sid, slen, fp_did, dlen,
|
|
|
c8a6c8 |
- fp_len - FP_LEN_ECHO, FP_LEN_DEF);
|
|
|
c8a6c8 |
+ (uint32_t)(fp_len - FP_LEN_ECHO), FP_LEN_DEF);
|
|
|
c8a6c8 |
|
|
|
c8a6c8 |
/* fp_len is the total payload, including 4 bytes for ECHO command */
|
|
|
c8a6c8 |
fp_len = MIN(fp_len, plen + FP_LEN_ECHO);
|
|
|
c8a6c8 |
- printf("Actual FC ELS ECHO data size used : %lu bytes.\n"
|
|
|
c8a6c8 |
+ printf("Actual FC ELS ECHO data size used : %" PRIu32 " bytes.\n"
|
|
|
c8a6c8 |
"Actual FC ELS ECHO payload size used : %d bytes "
|
|
|
c8a6c8 |
- "(including %ld bytes ECHO command).\n",
|
|
|
c8a6c8 |
- fp_len - FP_LEN_ECHO, fp_len, FP_LEN_ECHO);
|
|
|
c8a6c8 |
+ "(including %zu bytes ECHO command).\n",
|
|
|
c8a6c8 |
+ (uint32_t)(fp_len - FP_LEN_ECHO), fp_len, FP_LEN_ECHO);
|
|
|
c8a6c8 |
}
|
|
|
c8a6c8 |
|
|
|
c8a6c8 |
/*
|