summaryrefslogtreecommitdiffstats
path: root/ctdb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-05-23 20:15:09 +1000
committerAndrew Tridgell <tridge@samba.org>2007-05-23 20:15:09 +1000
commit5dc81da87e6a5947e9af6cf5856fdc400f5d44d2 (patch)
treeb61b4faaeedc2d062e719a0896d763d906969780 /ctdb
parent296e15c9d49d3b5a14b9d04d5d8d6ab663f231ad (diff)
downloadsamba-5dc81da87e6a5947e9af6cf5856fdc400f5d44d2.tar.gz
samba-5dc81da87e6a5947e9af6cf5856fdc400f5d44d2.tar.xz
samba-5dc81da87e6a5947e9af6cf5856fdc400f5d44d2.zip
fixed %d which should be %u
(This used to be ctdb commit 2792cf718ff1e66fe99f870f683a13baa160f629)
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/common/ctdb.c33
-rw-r--r--ctdb/common/ctdb_call.c8
-rw-r--r--ctdb/common/ctdb_client.c12
-rw-r--r--ctdb/common/ctdb_control.c2
-rw-r--r--ctdb/common/ctdb_daemon.c6
-rw-r--r--ctdb/common/ctdb_recoverd.c20
-rw-r--r--ctdb/common/ctdb_util.c2
7 files changed, 41 insertions, 42 deletions
diff --git a/ctdb/common/ctdb.c b/ctdb/common/ctdb.c
index 10ae107e7c4..7719c2984cc 100644
--- a/ctdb/common/ctdb.c
+++ b/ctdb/common/ctdb.c
@@ -251,8 +251,8 @@ void ctdb_input_pkt(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
tmp_ctx = talloc_new(ctdb);
talloc_steal(tmp_ctx, hdr);
- DEBUG(3,(__location__ " ctdb request %d of type %d length %d from "
- "node %d to %d\n", hdr->reqid, hdr->operation, hdr->length,
+ DEBUG(3,(__location__ " ctdb request %u of type %u length %u from "
+ "node %u to %u\n", hdr->reqid, hdr->operation, hdr->length,
hdr->srcnode, hdr->destnode));
switch (hdr->operation) {
@@ -265,14 +265,13 @@ void ctdb_input_pkt(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
same generation instance as this node
*/
if (ctdb->vnn_map->generation != hdr->generation) {
- DEBUG(0,(__location__ " ctdb request %d"
- " length %d from node %d to %d had an"
- " invalid generation id:%d while our"
- " generation id is:%d\n",
- hdr->reqid, hdr->length,
- hdr->srcnode, hdr->destnode,
- ctdb->vnn_map->generation,
- hdr->generation));
+ DEBUG(0,(__location__ " ctdb request %u"
+ " length %u from node %u to %u had an"
+ " invalid generation id:%u while our"
+ " generation id is:%u\n",
+ hdr->reqid, hdr->length,
+ hdr->srcnode, hdr->destnode,
+ hdr->generation, ctdb->vnn_map->generation));
goto done;
}
}
@@ -328,7 +327,7 @@ void ctdb_input_pkt(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
break;
default:
- DEBUG(0,("%s: Packet with unknown operation %d\n",
+ DEBUG(0,("%s: Packet with unknown operation %u\n",
__location__, hdr->operation));
break;
}
@@ -348,11 +347,11 @@ static void ctdb_recv_pkt(struct ctdb_context *ctdb, uint8_t *data, uint32_t len
ctdb->status.node_packets_recv++;
if (length < sizeof(*hdr)) {
- ctdb_set_error(ctdb, "Bad packet length %d\n", length);
+ ctdb_set_error(ctdb, "Bad packet length %u\n", length);
return;
}
if (length != hdr->length) {
- ctdb_set_error(ctdb, "Bad header length %d expected %d\n",
+ ctdb_set_error(ctdb, "Bad header length %u expected %u\n",
hdr->length, length);
return;
}
@@ -389,7 +388,7 @@ void ctdb_node_dead(struct ctdb_node *node)
node->flags &= ~NODE_FLAGS_CONNECTED;
node->rx_cnt = 0;
node->dead_count = 0;
- DEBUG(1,("%s: node %s is dead: %d connected\n",
+ DEBUG(1,("%s: node %s is dead: %u connected\n",
node->ctdb->name, node->name, node->ctdb->num_connected));
ctdb_daemon_cancel_controls(node->ctdb, node);
}
@@ -402,7 +401,7 @@ void ctdb_node_connected(struct ctdb_node *node)
node->ctdb->num_connected++;
node->dead_count = 0;
node->flags |= NODE_FLAGS_CONNECTED;
- DEBUG(1,("%s: connected to %s - %d connected\n",
+ DEBUG(1,("%s: connected to %s - %u connected\n",
node->ctdb->name, node->name, node->ctdb->num_connected));
}
@@ -416,11 +415,11 @@ void ctdb_daemon_connect_wait(struct ctdb_context *ctdb)
expected++;
}
while (ctdb->num_connected != expected) {
- DEBUG(3,("ctdb_connect_wait: waiting for %d nodes (have %d)\n",
+ DEBUG(3,("ctdb_connect_wait: waiting for %u nodes (have %u)\n",
expected, ctdb->num_connected));
event_loop_once(ctdb->ev);
}
- DEBUG(3,("ctdb_connect_wait: got all %d nodes\n", expected));
+ DEBUG(3,("ctdb_connect_wait: got all %u nodes\n", expected));
}
struct queue_next {
diff --git a/ctdb/common/ctdb_call.c b/ctdb/common/ctdb_call.c
index b65f3090753..c4194e3835d 100644
--- a/ctdb/common/ctdb_call.c
+++ b/ctdb/common/ctdb_call.c
@@ -327,7 +327,7 @@ static void ctdb_become_dmaster(struct ctdb_db_context *ctdb_db,
if (reqid != state->reqid) {
/* we found a record but it was the wrong one */
- DEBUG(0, ("Dropped orphan in ctdb_become_dmaster with reqid:%d\n",reqid));
+ DEBUG(0, ("Dropped orphan in ctdb_become_dmaster with reqid:%u\n",reqid));
ctdb_ltdb_unlock(ctdb_db, key);
return;
}
@@ -519,13 +519,13 @@ void ctdb_reply_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
state = ctdb_reqid_find(ctdb, hdr->reqid, struct ctdb_call_state);
if (state == NULL) {
- DEBUG(0, (__location__ " reqid %d not found\n", hdr->reqid));
+ DEBUG(0, (__location__ " reqid %u not found\n", hdr->reqid));
return;
}
if (hdr->reqid != state->reqid) {
/* we found a record but it was the wrong one */
- DEBUG(0, ("Dropped orphaned call reply with reqid:%d\n",hdr->reqid));
+ DEBUG(0, ("Dropped orphaned call reply with reqid:%u\n",hdr->reqid));
return;
}
@@ -598,7 +598,7 @@ void ctdb_reply_error(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
if (hdr->reqid != state->reqid) {
/* we found a record but it was the wrong one */
- DEBUG(0, ("Dropped orphaned error reply with reqid:%d\n",hdr->reqid));
+ DEBUG(0, ("Dropped orphaned error reply with reqid:%u\n",hdr->reqid));
return;
}
diff --git a/ctdb/common/ctdb_client.c b/ctdb/common/ctdb_client.c
index 89d48dbc582..c4531cb2d9f 100644
--- a/ctdb/common/ctdb_client.c
+++ b/ctdb/common/ctdb_client.c
@@ -72,13 +72,13 @@ static void ctdb_client_reply_call(struct ctdb_context *ctdb, struct ctdb_req_he
state = ctdb_reqid_find(ctdb, hdr->reqid, struct ctdb_client_call_state);
if (state == NULL) {
- DEBUG(0,(__location__ " reqid %d not found\n", hdr->reqid));
+ DEBUG(0,(__location__ " reqid %u not found\n", hdr->reqid));
return;
}
if (hdr->reqid != state->reqid) {
/* we found a record but it was the wrong one */
- DEBUG(0, ("Dropped client call reply with reqid:%d\n",hdr->reqid));
+ DEBUG(0, ("Dropped client call reply with reqid:%u\n",hdr->reqid));
return;
}
@@ -115,7 +115,7 @@ static void ctdb_client_read_cb(uint8_t *data, size_t cnt, void *args)
}
if (cnt < sizeof(*hdr)) {
- DEBUG(0,("Bad packet length %d in client\n", cnt));
+ DEBUG(0,("Bad packet length %u in client\n", cnt));
goto done;
}
if (cnt != hdr->length) {
@@ -152,7 +152,7 @@ static void ctdb_client_read_cb(uint8_t *data, size_t cnt, void *args)
break;
default:
- DEBUG(0,("bogus operation code:%d\n",hdr->operation));
+ DEBUG(0,("bogus operation code:%u\n",hdr->operation));
}
done:
@@ -633,13 +633,13 @@ static void ctdb_client_reply_control(struct ctdb_context *ctdb,
state = ctdb_reqid_find(ctdb, hdr->reqid, struct ctdb_client_control_state);
if (state == NULL) {
- DEBUG(0,(__location__ " reqid %d not found\n", hdr->reqid));
+ DEBUG(0,(__location__ " reqid %u not found\n", hdr->reqid));
return;
}
if (hdr->reqid != state->reqid) {
/* we found a record but it was the wrong one */
- DEBUG(0, ("Dropped orphaned reply control with reqid:%d\n",hdr->reqid));
+ DEBUG(0, ("Dropped orphaned reply control with reqid:%u\n",hdr->reqid));
return;
}
diff --git a/ctdb/common/ctdb_control.c b/ctdb/common/ctdb_control.c
index 917bce99f4f..17c4a3536c6 100644
--- a/ctdb/common/ctdb_control.c
+++ b/ctdb/common/ctdb_control.c
@@ -352,7 +352,7 @@ void ctdb_reply_control(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
if (hdr->reqid != state->reqid) {
/* we found a record but it was the wrong one */
- DEBUG(0, ("Dropped orphaned control reply with reqid:%d\n", hdr->reqid));
+ DEBUG(0, ("Dropped orphaned control reply with reqid:%u\n", hdr->reqid));
return;
}
diff --git a/ctdb/common/ctdb_daemon.c b/ctdb/common/ctdb_daemon.c
index 0e82194f883..7121d75a7fb 100644
--- a/ctdb/common/ctdb_daemon.c
+++ b/ctdb/common/ctdb_daemon.c
@@ -488,7 +488,7 @@ static void daemon_incoming_packet(void *p, struct ctdb_req_header *hdr)
break;
default:
- DEBUG(0,(__location__ " daemon: unrecognized operation %d\n",
+ DEBUG(0,(__location__ " daemon: unrecognized operation %u\n",
hdr->operation));
}
@@ -533,8 +533,8 @@ static void ctdb_daemon_read_cb(uint8_t *data, size_t cnt, void *args)
return;
}
- DEBUG(3,(__location__ " client request %d of type %d length %d from "
- "node %d to %d\n", hdr->reqid, hdr->operation, hdr->length,
+ DEBUG(3,(__location__ " client request %u of type %u length %u from "
+ "node %u to %u\n", hdr->reqid, hdr->operation, hdr->length,
hdr->srcnode, hdr->destnode));
/* it is the responsibility of the incoming packet function to free 'data' */
diff --git a/ctdb/common/ctdb_recoverd.c b/ctdb/common/ctdb_recoverd.c
index 2c8029f6962..246ab8d068a 100644
--- a/ctdb/common/ctdb_recoverd.c
+++ b/ctdb/common/ctdb_recoverd.c
@@ -438,7 +438,7 @@ static int do_recovery(struct ctdb_context *ctdb,
/* get a list of all databases */
ret = ctdb_ctrl_getdbmap(ctdb, timeval_current_ofs(1, 0), vnn, mem_ctx, &dbmap);
if (ret != 0) {
- DEBUG(0, (__location__ " Unable to get dbids from node :%d\n", vnn));
+ DEBUG(0, (__location__ " Unable to get dbids from node :%u\n", vnn));
return -1;
}
@@ -780,7 +780,7 @@ again:
}
if (recmaster!=vnn) {
- DEBUG(0, ("Node %d does not agree we are the recmaster. Force reelection\n", nodemap->nodes[j].vnn));
+ DEBUG(0, ("Node %u does not agree we are the recmaster. Force reelection\n", nodemap->nodes[j].vnn));
force_election(ctdb, mem_ctx, vnn, nodemap);
goto again;
}
@@ -801,7 +801,7 @@ again:
goto again;
}
if (recmode!=CTDB_RECOVERY_NORMAL) {
- DEBUG(0, (__location__ " Node:%d was in recovery mode. Restart recovery process\n", nodemap->nodes[j].vnn));
+ DEBUG(0, (__location__ " Node:%u was in recovery mode. Restart recovery process\n", nodemap->nodes[j].vnn));
do_recovery(ctdb, mem_ctx, vnn, num_active, nodemap, vnnmap);
goto again;
}
@@ -829,7 +829,7 @@ again:
then this is a good reason to try recovery
*/
if (remote_nodemap->num != nodemap->num) {
- DEBUG(0, (__location__ " Remote node:%d has different node count. %d vs %d of the local node\n", nodemap->nodes[j].vnn, remote_nodemap->num, nodemap->num));
+ DEBUG(0, (__location__ " Remote node:%u has different node count. %u vs %u of the local node\n", nodemap->nodes[j].vnn, remote_nodemap->num, nodemap->num));
do_recovery(ctdb, mem_ctx, vnn, num_active, nodemap, vnnmap);
goto again;
}
@@ -840,7 +840,7 @@ again:
for (i=0;i<nodemap->num;i++) {
if ((remote_nodemap->nodes[i].vnn != nodemap->nodes[i].vnn)
|| (remote_nodemap->nodes[i].flags != nodemap->nodes[i].flags)) {
- DEBUG(0, (__location__ " Remote node:%d has different nodemap.\n", nodemap->nodes[j].vnn));
+ DEBUG(0, (__location__ " Remote node:%u has different nodemap.\n", nodemap->nodes[j].vnn));
do_recovery(ctdb, mem_ctx, vnn, num_active, nodemap, vnnmap);
goto again;
}
@@ -853,7 +853,7 @@ again:
as there are active nodes or we will have to do a recovery
*/
if (vnnmap->size != num_active) {
- DEBUG(0, (__location__ " The vnnmap count is different from the number of active nodes. %d vs %d\n", vnnmap->size, num_active));
+ DEBUG(0, (__location__ " The vnnmap count is different from the number of active nodes. %u vs %u\n", vnnmap->size, num_active));
do_recovery(ctdb, mem_ctx, vnn, num_active, nodemap, vnnmap);
goto again;
}
@@ -875,7 +875,7 @@ again:
}
}
if (i==vnnmap->size) {
- DEBUG(0, (__location__ " Node %d is active in the nodemap but did not exist in the vnnmap\n", nodemap->nodes[j].vnn));
+ DEBUG(0, (__location__ " Node %u is active in the nodemap but did not exist in the vnnmap\n", nodemap->nodes[j].vnn));
do_recovery(ctdb, mem_ctx, vnn, num_active, nodemap, vnnmap);
goto again;
}
@@ -901,14 +901,14 @@ again:
/* verify the vnnmap generation is the same */
if (vnnmap->generation != remote_vnnmap->generation) {
- DEBUG(0, (__location__ " Remote node %d has different generation of vnnmap. %d vs %d (ours)\n", nodemap->nodes[j].vnn, remote_vnnmap->generation, vnnmap->generation));
+ DEBUG(0, (__location__ " Remote node %u has different generation of vnnmap. %u vs %u (ours)\n", nodemap->nodes[j].vnn, remote_vnnmap->generation, vnnmap->generation));
do_recovery(ctdb, mem_ctx, vnn, num_active, nodemap, vnnmap);
goto again;
}
/* verify the vnnmap size is the same */
if (vnnmap->size != remote_vnnmap->size) {
- DEBUG(0, (__location__ " Remote node %d has different size of vnnmap. %d vs %d (ours)\n", nodemap->nodes[j].vnn, remote_vnnmap->size, vnnmap->size));
+ DEBUG(0, (__location__ " Remote node %u has different size of vnnmap. %u vs %u (ours)\n", nodemap->nodes[j].vnn, remote_vnnmap->size, vnnmap->size));
do_recovery(ctdb, mem_ctx, vnn, num_active, nodemap, vnnmap);
goto again;
}
@@ -916,7 +916,7 @@ again:
/* verify the vnnmap is the same */
for (i=0;i<vnnmap->size;i++) {
if (remote_vnnmap->map[i] != vnnmap->map[i]) {
- DEBUG(0, (__location__ " Remote node %d has different vnnmap.\n", nodemap->nodes[j].vnn));
+ DEBUG(0, (__location__ " Remote node %u has different vnnmap.\n", nodemap->nodes[j].vnn));
do_recovery(ctdb, mem_ctx, vnn, num_active, nodemap, vnnmap);
goto again;
}
diff --git a/ctdb/common/ctdb_util.c b/ctdb/common/ctdb_util.c
index 629233fe5fa..bec4ccf860c 100644
--- a/ctdb/common/ctdb_util.c
+++ b/ctdb/common/ctdb_util.c
@@ -154,7 +154,7 @@ void *_ctdb_reqid_find(struct ctdb_context *ctdb, uint32_t reqid, const char *ty
p = _idr_find_type(ctdb->idr, (reqid>>16)&0xFFFF, type, location);
if (p == NULL) {
- DEBUG(0, ("Could not find idr:%d\n",reqid));
+ DEBUG(0, ("Could not find idr:%u\n",reqid));
}
return p;