shithub: gefs

Download patch

ref: 824e9997fa6d94379f0cd049723c0b9bb6e6da75
parent: 5b623ee54c90aaa5647f1b77075e3c0ca6ae294c
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Dec 26 13:35:32 EST 2022

dat: rename Traw => Tdat for harmony with key name

--- a/blk.c
+++ b/blk.c
@@ -86,7 +86,7 @@
 	b->hnext = nil;
 	b->flag = 0;
 
-	b->type = (flg&GBraw) ? Traw : UNPACK16(b->buf+0);
+	b->type = (flg&GBraw) ? Tdat : UNPACK16(b->buf+0);
 	b->bp.addr = bp;
 	b->bp.hash = -1;
 	b->bp.gen = -1;
@@ -104,7 +104,7 @@
 		fprint(2, "invalid block @%llx\n", bp);
 		abort();
 		break;
-	case Traw:
+	case Tdat:
 	case Tarena:
 		b->data = b->buf;
 		break;
@@ -656,7 +656,7 @@
 	b->bp.hash = -1;
 	b->bp.gen = fs->nextgen;
 	switch(t){
-	case Traw:
+	case Tdat:
 	case Tarena:
 		b->data = b->buf;
 		break;
@@ -726,7 +726,7 @@
 {
 	uvlong h;
 
-	if(b->type != Traw)
+	if(b->type != Tdat)
 		PACK16(b->buf, b->type);
 
 	switch(b->type){
@@ -749,7 +749,7 @@
 		PACK64(b->data, h);
 		b->bp.hash = blkhash(b);
 		break;
-	case Traw:
+	case Tdat:
 		b->bp.hash = blkhash(b);
 		break;
 	case Tmagic:
--- a/dat.h
+++ b/dat.h
@@ -220,7 +220,7 @@
  *	off[8] hash[8] fill[2]
  */
 enum {
-	Traw,
+	Tdat,
 	Tpivot,
 	Tleaf,
 	Tlog,
--- a/dump.c
+++ b/dump.c
@@ -284,8 +284,8 @@
 	case Tdead:
 		fprint(fd, "dead -- ");
 		goto Show;
-	case Traw:
-		fprint(fd, "raw -- ");
+	case Tdat:
+		fprint(fd, "dat -- ");
 	Show:
 		for(i = 0; i < 32; i++){
 			fprint(fd, "%x", b->buf[i] & 0xff);
--- a/fs.c
+++ b/fs.c
@@ -322,7 +322,7 @@
 	PACK64(m->k+9, fb);
 
 
-	b = newblk(Traw);
+	b = newblk(Tdat);
 	if(b == nil)
 		return -1;
 	t = nil;