[sheepdog] [PATCH] farm: use PRIx64 to print oid

Liu Yuan namei.unix at gmail.com
Thu Jul 18 13:34:41 CEST 2013


Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
 collie/farm/farm.c        |    4 ++--
 collie/farm/object_tree.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/collie/farm/farm.c b/collie/farm/farm.c
index a42ac47..14481ff 100644
--- a/collie/farm/farm.c
+++ b/collie/farm/farm.c
@@ -250,7 +250,7 @@ static void do_save_object(struct work *work)
 	return;
 error:
 	free(buf);
-	fprintf(stderr, "Fail to save object, oid %"PRIu64"\n",
+	fprintf(stderr, "Fail to save object, oid %"PRIx64"\n",
 		sw->entry.oid);
 	uatomic_set_true(&work_error);
 }
@@ -369,7 +369,7 @@ static void do_load_object(struct work *work)
 	return;
 error:
 	free(buffer);
-	fprintf(stderr, "Fail to load object, oid %"PRIu64"\n", sw->entry.oid);
+	fprintf(stderr, "Fail to load object, oid %"PRIx64"\n", sw->entry.oid);
 	uatomic_set_true(&work_error);
 }
 
diff --git a/collie/farm/object_tree.c b/collie/farm/object_tree.c
index 97cb3e7..d778a4f 100644
--- a/collie/farm/object_tree.c
+++ b/collie/farm/object_tree.c
@@ -84,7 +84,7 @@ void object_tree_print(void)
 
 	while (p) {
 		entry = rb_entry(p, struct object_tree_entry, node);
-		printf("Obj id: %"PRIu64"\n", entry->oid);
+		printf("Obj id: %"PRIx64"\n", entry->oid);
 		p = rb_next(p);
 	}
 }
-- 
1.7.9.5




More information about the sheepdog mailing list