shithub: gefs

Download patch

ref: 9ad8b287aa29320289b19fa2006f1fc35e1658ee
parent: 6a03fb24de2ceb5b093e3771351c71adc4f4db49
author: glenda <glenda@9front.local>
date: Sun Nov 28 16:38:51 EST 2021

dump: fix printing Odelete messages

--- a/dump.c
+++ b/dump.c
@@ -39,7 +39,7 @@
 }
 
 static int
-showval(Fmt *fmt, Kvp *v, int op)
+showval(Fmt *fmt, Kvp *v, int op, int wsop)
 {
 	char *p;
 	Dir d;
@@ -66,15 +66,15 @@
 			break;
 		case Owstat:
 			p = v->v;
-			if(op & Owmtime){
+			if(wsop & Owmtime){
 				n += fmtprint(fmt, "mtime:%llx ", GBIT64(p));
 				p += 8;
 			}
-			if(op & Owsize){
+			if(wsop & Owsize){
 				n += fmtprint(fmt, "size:%llx ", GBIT64(p));
 				p += 8;
 			}
-			if(op & Owmode){
+			if(wsop & Owmode){
 				n += fmtprint(fmt, "mode:%o ", GBIT32(p));
 				p += 4;
 			}
@@ -124,7 +124,7 @@
 	n = fmtprint(fmt, "Msg(%s, ", opname[m->op]);
 	n += showkey(fmt, m);
 	n += fmtprint(fmt, ") => (");
-	n += showval(fmt, m, m->statop);
+	n += showval(fmt, m, m->op, m->statop);
 	n += fmtprint(fmt, ")");
 	return n;
 }
@@ -142,7 +142,7 @@
 	n += showkey(fmt, kv);
 	n += fmtprint(fmt, ") => (");
 	if(kv->type == Vinl)
-		n += showval(fmt, kv, Onop);
+		n += showval(fmt, kv, Onop, 0);
 	else
 		n += fmtprint(fmt, "(%B,%ud))", kv->bp, kv->fill);
 	n += fmtprint(fmt, ")");