shithub: gefs

Download patch

ref: eb70af1698f4f4c849ed68672956a4e03c7c01d5
parent: 0933f7402c701261ea704557410accad9e73f770
author: Ori Bernstein <ori@eigenstate.org>
date: Fri Dec 15 18:06:31 EST 2023

dump: make snap ids print consistently

--- a/dump.c
+++ b/dump.c
@@ -31,10 +31,10 @@
 			UNPACK64(k->k+1), k->nk-11, k->k+11);
 		break;
 	case Klabel:	/* name[n] => tree[24]:	snapshot ref */
-		n = fmtprint(fmt, "label name:\"%.*s\"", k->nk-1, k->k+1);
+		n = fmtprint(fmt, "label name:\"%.*s\"", pk->nk-1, k->k+1);
 		break;
 	case Ksnap:	/* name[n] => tree[24]:	snapshot root */
-		n = fmtprint(fmt, "snap id:%lld", UNPACK64(k->k+1));
+		n = fmtprint(fmt, "snap id:%llx", UNPACK64(k->k+1));
 		break;
 	case Kup:	/* qid[8] => pqid[8]:		parent dir */
 		n = fmtprint(fmt, "up dir:%llx", UNPACK64(k->k+1));
@@ -154,7 +154,7 @@
 		}
 		break;
 	case Klabel:
-		n = fmtprint(fmt, "snap id:\"%lld\"", UNPACK64(v->v+1));
+		n = fmtprint(fmt, "snap id:%llx", UNPACK64(v->v+1));
 		break;
 	case Kup:	/* qid[8] => pqid[8]:		parent dir */
 		n = fmtprint(fmt, "super dir:%llx, name:\"%.*s\")",