summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2010-05-20 13:28:05 -0700
committerInaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>2010-05-20 15:37:30 -0700
commit7d95c86f19a6ae4fa51badc9c1b85715567e7d79 (patch)
tree604daf2e83ab2c0a6af5a2960b5989e52cff71d1
parent42c0b344bec7d2985b098d9e707ade8a1299eb23 (diff)
wimax-tools: 64-bit log correctness
Misc 64-bit fixes. Need to use 'z' when printing out size_t and ssize_t. Signed-off-by: Dan Williams <dcbw@redhat.com>
-rw-r--r--lib/op-msg.c12
-rw-r--r--lib/op-reset.c4
-rw-r--r--lib/op-rfkill.c4
-rw-r--r--lib/op-state-get.c4
-rw-r--r--lib/re-state-change.c2
5 files changed, 13 insertions, 13 deletions
diff --git a/lib/op-msg.c b/lib/op-msg.c
index c3c9426..e9c5091 100644
--- a/lib/op-msg.c
+++ b/lib/op-msg.c
@@ -175,7 +175,7 @@ int wimaxll_gnl_handle_msg_to_user(struct wimaxll_handle *wmx,
result = genlmsg_parse(nl_hdr, 0, tb, WIMAX_GNL_ATTR_MAX,
wimaxll_gnl_msg_from_user_policy);
if (result < 0) {
- wimaxll_msg(wmx, "E: %s: genlmsg_parse() failed: %d\n",
+ wimaxll_msg(wmx, "E: %s: genlmsg_parse() failed: %zd\n",
__func__, result);
goto error_parse;
}
@@ -209,7 +209,7 @@ int wimaxll_gnl_handle_msg_to_user(struct wimaxll_handle *wmx,
d_printf(1, wmx, "D: CRX genlmsghdr cmd %u version %u\n",
gnl_hdr->cmd, gnl_hdr->version);
- d_printf(1, wmx, "D: CRX msg from kernel %u bytes pipe %s\n",
+ d_printf(1, wmx, "D: CRX msg from kernel %zu bytes pipe %s\n",
size, pipe_name);
d_dump(2, wmx, data, size);
@@ -227,7 +227,7 @@ int wimaxll_gnl_handle_msg_to_user(struct wimaxll_handle *wmx,
wmx->ifidx = dest_ifidx;
error_no_attrs:
error_parse:
- d_fnend(7, wmx, "(wmx %p msg %p) = %d\n", wmx, msg, result);
+ d_fnend(7, wmx, "(wmx %p msg %p) = %zd\n", wmx, msg, result);
return result;
}
@@ -426,7 +426,7 @@ ssize_t wimaxll_msg_write(struct wimaxll_handle *wmx,
WIMAX_GNL_OP_MSG_FROM_USER, WIMAX_GNL_VERSION);
if (msg == NULL) {
result = nl_get_errno();
- wimaxll_msg(wmx, "E: %s: error preparing message: %d\n",
+ wimaxll_msg(wmx, "E: %s: error preparing message: %zd\n",
__func__, result);
goto error_msg_prep;
}
@@ -444,13 +444,13 @@ ssize_t wimaxll_msg_write(struct wimaxll_handle *wmx,
result = nl_send_auto_complete(wmx->nlh_tx, nl_msg);
if (result < 0) {
- wimaxll_msg(wmx, "E: error sending message: %d\n", result);
+ wimaxll_msg(wmx, "E: error sending message: %zd\n", result);
goto error_msg_send;
}
result = wimaxll_wait_for_ack(wmx); /* Get the ACK from netlink */
if (result < 0)
- wimaxll_msg(wmx, "E: %s: generic netlink ack failed: %d\n",
+ wimaxll_msg(wmx, "E: %s: generic netlink ack failed: %zd\n",
__func__, result);
error_msg_send:
error_msg_prep:
diff --git a/lib/op-reset.c b/lib/op-reset.c
index 7c6585f..4ec9619 100644
--- a/lib/op-reset.c
+++ b/lib/op-reset.c
@@ -105,7 +105,7 @@ int wimaxll_reset(struct wimaxll_handle *wmx)
WIMAX_GNL_OP_RESET, WIMAX_GNL_VERSION) == NULL) {
result = -ENOMEM;
wimaxll_msg(wmx, "E: RESET: error preparing message: "
- "%d 0x%08x\n", result, result);
+ "%zd 0x%08x\n", result, (unsigned int) result);
goto error_msg_prep;
}
nla_put_u32(msg, WIMAX_GNL_RESET_IFIDX, (__u32) wmx->ifidx);
@@ -124,6 +124,6 @@ error_msg_send:
nlmsg_free(msg);
error_msg_alloc:
error_not_any:
- d_fnend(3, wmx, "(wmx %p) = %d\n", wmx, result);
+ d_fnend(3, wmx, "(wmx %p) = %zd\n", wmx, result);
return result;
}
diff --git a/lib/op-rfkill.c b/lib/op-rfkill.c
index 08cf4e5..5f4cbe0 100644
--- a/lib/op-rfkill.c
+++ b/lib/op-rfkill.c
@@ -110,7 +110,7 @@ int wimaxll_rfkill(struct wimaxll_handle *wmx, enum wimax_rf_state state)
WIMAX_GNL_OP_RFKILL, WIMAX_GNL_VERSION) == NULL) {
result = -ENOMEM;
wimaxll_msg(wmx, "E: RFKILL: error preparing message: "
- "%d 0x%08x\n", result, result);
+ "%zd 0x%08x\n", result, (unsigned int) result);
goto error_msg_prep;
}
nla_put_u32(msg, WIMAX_GNL_RFKILL_IFIDX, (__u32) wmx->ifidx);
@@ -130,6 +130,6 @@ error_msg_send:
nlmsg_free(msg);
error_msg_alloc:
error_not_any:
- d_fnend(3, wmx, "(wmx %p state %u) = %d\n", wmx, state, result);
+ d_fnend(3, wmx, "(wmx %p state %u) = %zd\n", wmx, state, result);
return result;
}
diff --git a/lib/op-state-get.c b/lib/op-state-get.c
index 9822bf8..8090bf2 100644
--- a/lib/op-state-get.c
+++ b/lib/op-state-get.c
@@ -88,7 +88,7 @@ int wimaxll_state_get(struct wimaxll_handle *wmx)
WIMAX_GNL_OP_STATE_GET, WIMAX_GNL_VERSION) == NULL) {
result = -ENOMEM;
wimaxll_msg(wmx, "E: STATE_GET: error preparing message: "
- "%d 0x%08x\n", result, result);
+ "%zd 0x%08x\n", result, (unsigned int) result);
goto error_msg_prep;
}
nla_put_u32(msg, WIMAX_GNL_STGET_IFIDX, (__u32) wmx->ifidx);
@@ -107,6 +107,6 @@ error_msg_send:
nlmsg_free(msg);
error_msg_alloc:
error_not_any:
- d_fnend(3, wmx, "(wmx %p) = %d\n", wmx, result);
+ d_fnend(3, wmx, "(wmx %p) = %zd\n", wmx, result);
return result;
}
diff --git a/lib/re-state-change.c b/lib/re-state-change.c
index cbbcd55..ebd8cb2 100644
--- a/lib/re-state-change.c
+++ b/lib/re-state-change.c
@@ -137,7 +137,7 @@ int wimaxll_gnl_handle_state_change(struct wimaxll_handle *wmx,
result = genlmsg_parse(nl_hdr, 0, tb, WIMAX_GNL_ATTR_MAX,
wimaxll_gnl_re_state_change_policy);
if (result < 0) {
- wimaxll_msg(wmx, "E: %s: genlmsg_parse() failed: %d\n",
+ wimaxll_msg(wmx, "E: %s: genlmsg_parse() failed: %zd\n",
__func__, result);
goto error_parse;
}