From fa325e9b42b0bdfb48857d1958d9fb7ceac55151 Mon Sep 17 00:00:00 2001 From: Dan Cross Date: Fri, 10 Jan 2020 14:44:21 +0000 Subject: Trivial changes: whitespace and modes. Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross --- src/cmd/venti/srv/hdisk.c | 66 +++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'src/cmd/venti/srv/hdisk.c') diff --git a/src/cmd/venti/srv/hdisk.c b/src/cmd/venti/srv/hdisk.c index 8cf937d1..e477b815 100644 --- a/src/cmd/venti/srv/hdisk.c +++ b/src/cmd/venti/srv/hdisk.c @@ -14,7 +14,7 @@ hdisk(HConnect *c) char *disk, *type; Part *p; int ret; - + if(hsethtml(c) < 0) return -1; @@ -42,7 +42,7 @@ hdisk(HConnect *c) return 0; } freepart(p); - return ret; + return ret; } static int @@ -51,7 +51,7 @@ disksummary(HConnect *c) int i; Index *ix; Part *p; - + hprint(&c->hout, "

venti disks

\n"); hprint(&c->hout, "
\n");
 	ix = mainindex;
@@ -83,7 +83,7 @@ readap(Part *p, ArenaPart *ap)
 {
 	uchar *blk;
 	char *table;
-	
+
 	blk = vtmalloc(8192);
 	if(readpart(p, PartBlank, blk, 8192) != 8192)
 		return nil;
@@ -108,7 +108,7 @@ xfindarena(char *table, char *name, vlong *start, vlong *end)
 {
 	int i, nline;
 	char *p, *q, *f[4], line[256];
-	
+
 	nline = atoi(table);
 	p = strchr(table, '\n');
 	if(p)
@@ -212,7 +212,7 @@ diskarenapart(HConnect *c, char *disk, Part *p)
 		hprint(&c->hout, "%r\n");
 		goto out;
 	}
-	
+
 	hprint(&c->hout, "
\n");
 	hprint(&c->hout, "version=%d blocksize=%d base=%d\n",
 		ap.version, ap.blocksize, ap.arenabase);
@@ -223,12 +223,12 @@ diskarenapart(HConnect *c, char *disk, Part *p)
 		diskarenatable(c, disk, table);
 		goto out;
 	}
-	
+
 	if(xfindarena(table, arenaname, &start, &end) < 0){
 		hprint(&c->hout, "no such arena %s\n", arenaname);
 		goto out;
 	}
-	
+
 	hprint(&c->hout, "

arena %s

\n", arenaname); hprint(&c->hout, "
start=%#llx end=%#llx
\n", start, end);
 	if(end < start || end - start < HeadSize){
@@ -253,7 +253,7 @@ diskarenapart(HConnect *c, char *disk, Part *p)
 
 	hprint(&c->hout, "head:\n
\n");
 	hprint(&c->hout, "version=%d name=%s blocksize=%d size=%#llx clumpmagic=%#ux\n",
-		head.version, head.name, head.blocksize, head.size, 
+		head.version, head.name, head.blocksize, head.size,
 		head.clumpmagic);
 	hprint(&c->hout, "


\n"); @@ -281,7 +281,7 @@ diskarenapart(HConnect *c, char *disk, Part *p) scorecp(arena.score, blk+head.blocksize - VtScoreSize); vtfree(blk); - + hprint(&c->hout, "tail:\n
\n");
 	hprint(&c->hout, "version=%d name=%s\n", arena.version, arena.name);
 	hprint(&c->hout, "ctime=%d %s\n", arena.ctime, fmttime(tbuf, arena.ctime));
@@ -389,10 +389,10 @@ diskarenatoc(HConnect *c, Arena *arena)
 		}
 		unpackclumpinfo(&ci, blk+(i%arena->clumpmax)*ClumpInfoSize);
 		if(i/arena->clumpmax == cib || i%arena->clumpmax == 0){
-			hprint(&c->hout, "%5d %6d %7d %V", 
+			hprint(&c->hout, "%5d %6d %7d %V",
 				ci.type, ci.size, ci.uncsize, ci.score);
 			if(coff >= 0)
-				hprint(&c->hout, " at %#llx", 
+				hprint(&c->hout, " at %#llx",
 					base, coff, ci.score, coff);
 			if(i/arena->clumpmax != cib)
 				hprint(&c->hout, "  more", base, i/arena->clumpmax);
@@ -415,7 +415,7 @@ diskarenaclump(HConnect *c, Arena *arena, vlong off, char *scorestr)
 	uchar xscore[VtScoreSize], score[VtScoreSize];
 	Unwhack uw;
 	int n;
-	
+
 	if(scorestr){
 		if(vtparsescore(scorestr, nil, score) < 0){
 			hprint(&c->hout, "bad score %s: %r\n", scorestr);
@@ -436,7 +436,7 @@ diskarenaclump(HConnect *c, Arena *arena, vlong off, char *scorestr)
 		hprint(&c->hout, "bad offset %#llx\n", off);
 		return -1;
 	}
-	
+
 	off += arena->base;
 
 	blk = vtmalloc(ClumpSize + VtMaxLumpSize);
@@ -461,15 +461,15 @@ diskarenaclump(HConnect *c, Arena *arena, vlong off, char *scorestr)
 
 	hprint(&c->hout, "
type=%d size=%d uncsize=%d score=%V\n", cl.info.type, cl.info.size, cl.info.uncsize, cl.info.score);
 	hprint(&c->hout, "encoding=%d creator=%d time=%d %s
\n", cl.encoding, cl.creator, cl.time, fmttime(err, cl.time)); - + if(cl.info.type == VtCorruptType) hprint(&c->hout, "clump is marked corrupt
\n"); - + if(cl.info.size >= VtMaxLumpSize){ hprint(&c->hout, "clump too big\n"); goto error; } - + switch(cl.encoding){ case ClumpECompress: blk2 = vtmalloc(VtMaxLumpSize); @@ -493,7 +493,7 @@ diskarenaclump(HConnect *c, Arena *arena, vlong off, char *scorestr) scoremem(xscore, blk+ClumpSize, cl.info.size); break; } - + hprint(&c->hout, "score=%V
\n", xscore); if(scorestr && scorecmp(score, xscore) != 0) hprint(&c->hout, "score does NOT match expected %V\n", score); @@ -536,7 +536,7 @@ debugamap(HConnect *c) amap = mainindex->amap; for(i=0; inarenas; i++) - hprint(&c->hout, "%s %#llx %#llx\n", + hprint(&c->hout, "%s %#llx %#llx\n", amap[i].name, amap[i].start, amap[i].stop); } @@ -559,23 +559,23 @@ debugread(HConnect *c, u8int *score) hprint(&c->hout, "zero score\n"); return; } - + hprint(&c->hout, "

index search %V

\n", score);
 	if(icachelookup(score, -1, &ia) < 0)
 		hprint(&c->hout, "  icache: not found\n");
 	else
 		hprint(&c->hout, "  icache: addr=%#llx size=%d type=%d blocks=%d\n",
 			ia.addr, ia.size, ia.type, ia.blocks);
-	
+
 	if(loadientry(mainindex, score, -1, &ie) < 0)
 		hprint(&c->hout, "  idisk: not found\n");
 	else
 		hprint(&c->hout, "  idisk: addr=%#llx size=%d type=%d blocks=%d\n",
 			ie.ia.addr, ie.ia.size, ie.ia.type, ie.ia.blocks);
-	
+
 	hprint(&c->hout, "

lookup %V

\n", score); hprint(&c->hout, "
\n");
-	
+
 	for(type=0; type < VtMaxType; type++){
 		hprint(&c->hout, "%V type %d:", score, type);
 		u = lookuplump(score, type);
@@ -584,14 +584,14 @@ debugread(HConnect *c, u8int *score)
 		else
 			hprint(&c->hout, " -cache");
 		putlump(u);
-		
+
 		if(lookupscore(score, type, &ia) < 0){
 			hprint(&c->hout, " -lookup\n");
 			continue;
 		}
 		hprint(&c->hout, "\n  lookupscore: addr=%#llx size=%d blocks=%d\n",
 			ia.addr, ia.size, ia.blocks);
-		
+
 		arena = amapitoa(mainindex, ia.addr, &aa);
 		if(arena == nil){
 			hprint(&c->hout, "  amapitoa failed: %r\n");
@@ -606,7 +606,7 @@ debugread(HConnect *c, u8int *score)
 			hprint(&c->hout, "  loadclump failed: %r\n");
 			continue;
 		}
-		
+
 		hprint(&c->hout, "  loadclump: uncsize=%d type=%d score=%V\n",
 			cl.info.uncsize, cl.info.type, sc);
 		if(ia.size != cl.info.uncsize || ia.type != cl.info.type || scorecmp(score, sc) != 0){
@@ -614,12 +614,12 @@ debugread(HConnect *c, u8int *score)
 			continue;
 		}
 	}
-	
+
 	if(hargstr(c, "brute", "")[0] == 'y'){
 		hprint(&c->hout, "
\n"); hprint(&c->hout, "

brute force arena search %V

\n", score); hprint(&c->hout, "
\n");
-		
+
 		for(i=0; inarenas; i++){
 			arena = mainindex->arenas[i];
 			hprint(&c->hout, "%s...\n", arena->name);
@@ -637,10 +637,10 @@ static void
 debugmem(HConnect *c)
 {
 	Index *ix;
-	
+
 	ix = mainindex;
 	hprint(&c->hout, "

memory

\n"); - + hprint(&c->hout, "
\n");
 	hprint(&c->hout, "ix=%p\n", ix);
 	hprint(&c->hout, "\tarenas=%p\n", ix->arenas);
@@ -660,7 +660,7 @@ hdebug(HConnect *c)
 {
 	char *scorestr, *op;
 	u8int score[VtScoreSize];
-	
+
 	if(hsethtml(c) < 0)
 		return -1;
 	hprint(&c->hout, "

venti debug

\n"); @@ -670,7 +670,7 @@ hdebug(HConnect *c) hprint(&c->hout, "no op\n"); return 0; } - + if(strcmp(op, "amap") == 0){ debugamap(c); return 0; @@ -690,7 +690,7 @@ hdebug(HConnect *c) debugread(c, score); return 0; } - + hprint(&c->hout, "unknown op %s", op); return 0; } -- cgit v1.2.3