Skip to contentSkip to conversation

Add numeric hdr.type to ckptinfo

PATCH In review Sukadev Bhattiprolu 3 participants 3 messages Apr 21, 2010 – Apr 25, 2010 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add numeric hdr.type to ckptinfo

From: Sukadev Bhattiprolu <[email protected]>
Date: Tue, 20 Apr 2010 19:08:08 -0700
Subject: [PATCH 1/1] Add the numeric value of hdr.type

Debug messaages into dmesg rightly print only the numeric value of the CKPT_HDR type. ckptinfo prints the descriptive macro. But to correlate the two, one has to dive into the source to find the record type say 302 in dmesg and then find CKPT_HDR_FILE_DESC in ckptinfo output. Would be easier if ckptinfo printed both the numeric value and descriptive macro.

---
 ckptinfo.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
ckptinfo.c +2 -2
index 6190301..09b9db4 100644
@@ -182,8 +182,8 @@ static int image_read_obj(int fd, struct ckpt_hdr **hh)
 	if (ret == 0)
 		return 0;
 
-	VERBOSE("info: [@%lu] object %s len %d\n",
-		__filepos, hdr_to_str(h.type), h.len);
+	VERBOSE("info: [@%lu] object %3d %s len %d\n",
+		__filepos, h.type, hdr_to_str(h.type), h.len);
 
 	p = malloc(h.len);
 	if (!p) {
Signature · 1 line
1.6.6.1

A message that is not in the archive (sent off-list or not yet received): 20100421022314.GA25133-r/[email protected]

Acked-by Serge Hallyn
#2 lore raw
Quoted 5 lines · Sukadev Bhattiprolu

From: Sukadev Bhattiprolu <[email protected]>
Date: Tue, 20 Apr 2010 19:08:08 -0700
Subject: [PATCH 1/1] Add the numeric value of hdr.type

Quoted 7 lines

Debug messaages into dmesg rightly print only the numeric value of the CKPT_HDR type. ckptinfo prints the descriptive macro. But to correlate the two, one has to dive into the source to find the record type say 302 in dmesg and then find CKPT_HDR_FILE_DESC in ckptinfo output. Would be easier if ckptinfo printed both the numeric value and descriptive macro.

Heh, great point.

Quoted 26 lines
---
 ckptinfo.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
ckptinfo.c +2 -2
index 6190301..09b9db4 100644
@@ -182,8 +182,8 @@ static int image_read_obj(int fd, struct ckpt_hdr **hh)
 	if (ret == 0)
 		return 0;
 
-	VERBOSE("info: [@%lu] object %s len %d\n",
-		__filepos, hdr_to_str(h.type), h.len);
+	VERBOSE("info: [@%lu] object %3d %s len %d\n",
+		__filepos, h.type, hdr_to_str(h.type), h.len);
 
 	p = malloc(h.len);
 	if (!p) {
Signature · 6 lines
1.6.6.1

_______________________________________________
Containers mailing list
Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
https://lists.linux-foundation.org/mailman/listinfo/containers
#3 lore raw
In reply to a message not in the archive

Pulled, thanks.

Quoted 30 lines · Sukadev Bhattiprolu

From: Sukadev Bhattiprolu <[email protected]>
Date: Tue, 20 Apr 2010 19:08:08 -0700
Subject: [PATCH 1/1] Add the numeric value of hdr.type

Debug messaages into dmesg rightly print only the numeric value of the CKPT_HDR type. ckptinfo prints the descriptive macro. But to correlate the two, one has to dive into the source to find the record type say 302 in dmesg and then find CKPT_HDR_FILE_DESC in ckptinfo output. Would be easier if ckptinfo printed both the numeric value and descriptive macro.

---
 ckptinfo.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
ckptinfo.c +2 -2
index 6190301..09b9db4 100644
@@ -182,8 +182,8 @@ static int image_read_obj(int fd, struct ckpt_hdr **hh)
 	if (ret == 0)
 		return 0;
 
-	VERBOSE("info: [@%lu] object %s len %d\n",
-		__filepos, hdr_to_str(h.type), h.len);
+	VERBOSE("info: [@%lu] object %3d %s len %d\n",
+		__filepos, h.type, hdr_to_str(h.type), h.len);
 
 	p = malloc(h.len);
 	if (!p) {