[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/group/daemon app.c cpg.c joinleave.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	teigland sourceware org	2008-01-14 20:53:35

Modified files:
	group/daemon   : app.c cpg.c joinleave.c 

Log message:
	fix %llx printf warnings using (unsigned long long)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/daemon/app.c.diff?cvsroot=cluster&r1=1.55&r2=1.56
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/daemon/cpg.c.diff?cvsroot=cluster&r1=1.39&r2=1.40
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/daemon/joinleave.c.diff?cvsroot=cluster&r1=1.22&r2=1.23

--- cluster/group/daemon/app.c	2007/02/09 16:03:15	1.55
+++ cluster/group/daemon/app.c	2008/01/14 20:53:34	1.56
@@ -74,7 +74,7 @@
 	id = id | type;
 
 	log_group(g, "make_event_id %llx nodeid %d memb_count %d type %u",
-		  id, nodeid, g->memb_count, type);
+		  (unsigned long long)id, nodeid, g->memb_count, type);
 
 	return id;
 }
@@ -144,7 +144,8 @@
 				state_str = "error";
 
 			log_group(g, "purge msg %llx from %d %s",
-				  save->msg.ms_event_id, nodeid, state_str);
+				  (unsigned long long)save->msg.ms_event_id,
+				  nodeid, state_str);
 
 			list_del(&save->list);
 			if (save->msg_long)
@@ -354,12 +355,12 @@
 	struct nodeid *id;
 
 	log_group(g, "rev %llx done, remove group from rs %d",
-		  ev->id, ev->nodeid);
+		  (unsigned long long)ev->id, ev->nodeid);
 	_del_recovery_set(g, ev->nodeid, purge);
 
 	list_for_each_entry(id, &ev->extended, list) {
 		log_group(g, "rev %llx done, remove group from rs %d",
-			  ev->id, id->nodeid);
+			  (unsigned long long)ev->id, id->nodeid);
 		_del_recovery_set(g, id->nodeid, purge);
 	}
 }
@@ -614,7 +615,8 @@
 
 	list_for_each_entry(ev, &g->app->events, list) {
 		log_group(g, "    queued ev %d %llx %s",
-			  ev->nodeid, ev->id, ev_state_str(ev));
+			  ev->nodeid, (unsigned long long)ev->id,
+			  ev_state_str(ev));
 	}
 }
 
@@ -626,14 +628,14 @@
 	ev = g->app->current_event;
 	if (ev && ev->nodeid == nodeid) {
 		log_group(g, "queue_app_join: current event %d %llx %s",
-			  nodeid, ev->id, ev_state_str(ev));
+			  nodeid, (unsigned long long)ev->id, ev_state_str(ev));
 	}
 
 	/* sanity check */
 	ev = search_event(g, nodeid);
 	if (ev) {
 		log_group(g, "queue_app_join: queued event %d %llx %s",
-			  nodeid, ev->id, ev_state_str(ev));
+			  nodeid, (unsigned long long)ev->id, ev_state_str(ev));
 	}
 
 	ev = create_event(g);
@@ -659,14 +661,14 @@
 	ev = g->app->current_event;
 	if (ev && ev->nodeid == nodeid) {
 		log_group(g, "queue_app_leave: current event %d %llx %s",
-			  nodeid, ev->id, ev_state_str(ev));
+			  nodeid, (unsigned long long)ev->id, ev_state_str(ev));
 	}
 
 	/* sanity check */
 	ev = search_event(g, nodeid);
 	if (ev) {
 		log_group(g, "queue_app_leave: queued event %d %llx %s",
-			  nodeid, ev->id, ev_state_str(ev));
+			  nodeid, (unsigned long long)ev->id, ev_state_str(ev));
 	}
 
 	ev = create_event(g);
@@ -953,7 +955,8 @@
 
 	if (!(event_state_stopping(a) || event_state_starting(a)))
 		log_group(g, "process_current_event %llx %d %s",
-			  ev->id, ev->nodeid, ev_state_str(ev));
+			  (unsigned long long)ev->id, ev->nodeid,
+			  ev_state_str(ev));
 
 	switch (ev->state) {
 
@@ -1182,7 +1185,8 @@
 	default:
 		/*
 		log_group(g, "nothing to do: %llx %d %s",
-			  ev->id, ev->nodeid, ev_state_str(ev));
+			  (unsigned long long)ev->id, ev->nodeid,
+			  ev_state_str(ev));
 		*/
 		break;
 	}
@@ -1300,10 +1304,9 @@
 				   recover_current_event() to see, it will
 				   be purged later */
 				if (!save->print_ignore) {
-					log_group(g, "rev %llx taken on "
-						  "node %d",
-						  save->msg.ms_event_id,
-						  save->nodeid);
+					log_group(g, "rev %llx taken on node %d",
+						   (unsigned long long)save->msg.ms_event_id,
+						   save->nodeid);
 					save->print_ignore = 1;
 				}
 				continue;
@@ -1316,7 +1319,8 @@
 		if (!ev || ev->id != save->msg.ms_event_id) {
 			if (!save->print_ignore) {
 				log_group(g, "ignore msg from %d id %llx %s",
-				  	  save->nodeid, save->msg.ms_event_id,
+				  	  save->nodeid,
+					  (unsigned long long)save->msg.ms_event_id,
 				  	  msg_type(save->msg.ms_type));
 				save->print_ignore = 1;
 			}
@@ -1425,7 +1429,7 @@
 	printf("name: %s\n", g->name);
 	printf("level: %d\n", g->level);
 	printf("global_id: %u\n", g->global_id);
-	printf("cpg handle: %llx\n", g->cpg_handle);
+	printf("cpg handle: %llx\n", (unsigned long long)g->cpg_handle);
 	printf("cpg client: %d\n", g->cpg_client);
 	printf("app client: %d\n", g->app->client);
 
@@ -1587,7 +1591,8 @@
 				log_group(g, "our join is current on %d",
 					  node->nodeid);
 				log_group(g, "rev %d behind our join ev %llx",
-					  rev->nodeid, ev->id);
+					  rev->nodeid,
+					  (unsigned long long)ev->id);
 				goto next;
 			}
 		}
@@ -1606,7 +1611,9 @@
 				continue;
 
 			log_group(g, "rev %d %llx ahead of our join ev %llx",
-				  rev->nodeid, rev->id, ev->id);
+				  rev->nodeid,
+				  (unsigned long long)rev->id,
+				  (unsigned long long)ev->id);
 
 			node = find_app_node(a, rev->nodeid);
 			if (node) {
--- cluster/group/daemon/cpg.c	2007/09/07 19:17:27	1.39
+++ cluster/group/daemon/cpg.c	2008/01/14 20:53:34	1.40
@@ -342,7 +342,7 @@
 			memcpy(&name, &group_name->value, len);
 
 			log_print("deliver_cb no group handle %llx name %s",
-				  handle, name);
+				  (unsigned long long)handle, name);
 			return;
 		}
 	}
@@ -380,7 +380,8 @@
 	g = find_group_by_handle(saved_handle);
 	if (!g) {
 		log_debug("confchg: no group for handle %llx name %s",
-			  saved_handle, saved_name.value);
+			  (unsigned long long)saved_handle,
+			  saved_name.value);
 		return;
 	}
 
@@ -558,7 +559,8 @@
 		return error;
 	}
 
-	log_debug("setup_cpg groupd_handle %llx", groupd_handle);
+	log_debug("setup_cpg groupd_handle %llx",
+		  (unsigned long long)groupd_handle);
 	return 0;
 }
 
@@ -587,7 +589,8 @@
 	sprintf(name.value, "%d_%s", g->level, g->name);
 	name.length = strlen(name.value) + 1;
 
-	log_group(g, "is cpg client %d name %s handle %llx", ci, name.value, h);
+	log_group(g, "is cpg client %d name %s handle %llx", ci, name.value,
+		  (unsigned long long)h);
 
  retry:
 	error = cpg_join(h, &name);
@@ -654,7 +657,8 @@
 			log_error(g, "cpg_mcast_joined retry %d", retries);
 		goto retry;
 	} else if (error != CPG_OK)
-		log_error(g, "cpg_mcast_joined error %d handle %llx", error, h);
+		log_error(g, "cpg_mcast_joined error %d handle %llx", error,
+			  (unsigned long long)h);
 
 	if (retries)
 		log_group(g, "cpg_mcast_joined retried %d", retries);
--- cluster/group/daemon/joinleave.c	2007/09/07 19:17:27	1.22
+++ cluster/group/daemon/joinleave.c	2008/01/14 20:53:34	1.23
@@ -139,13 +139,15 @@
 
 	if (ev && ev->nodeid == our_nodeid) {
 		log_error(g, "leave: busy event %llx state %s",
-			  ev->id, ev_state_str(ev));
+			  (unsigned long long)ev->id,
+			  ev_state_str(ev));
 		return -EAGAIN;
 	}
 
 	list_for_each_entry(ev, &g->app->events, list) {
 		ASSERT(ev->nodeid != our_nodeid);
-		log_group(g, "do_leave: found queued event id %llx", ev->id);
+		log_group(g, "do_leave: found queued event id %llx",
+			  (unsigned long long)ev->id);
 	}
 
 	log_debug("%d:%s got leave", level, name);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]