diff options
author | rsc <devnull@localhost> | 2006-04-01 19:24:03 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2006-04-01 19:24:03 +0000 |
commit | cbeb0b26e4c7caa8d1b47de791a7418dc20a4567 (patch) | |
tree | e0f7e445de1aa22a42ef873dc4b1118a8105ae93 /src/libdiskfs | |
parent | 226d80b8213821af0cbf092d1507c52b504fd368 (diff) | |
download | plan9port-cbeb0b26e4c7caa8d1b47de791a7418dc20a4567.tar.gz plan9port-cbeb0b26e4c7caa8d1b47de791a7418dc20a4567.tar.bz2 plan9port-cbeb0b26e4c7caa8d1b47de791a7418dc20a4567.zip |
Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms.
Diffstat (limited to 'src/libdiskfs')
-rw-r--r-- | src/libdiskfs/cache.c | 6 | ||||
-rw-r--r-- | src/libdiskfs/ext2.c | 4 | ||||
-rw-r--r-- | src/libdiskfs/ext2.h | 4 | ||||
-rw-r--r-- | src/libdiskfs/ffs.c | 6 | ||||
-rw-r--r-- | src/libdiskfs/ffs.h | 2 | ||||
-rw-r--r-- | src/libdiskfs/file.c | 2 | ||||
-rw-r--r-- | src/libdiskfs/venti.c | 4 |
7 files changed, 14 insertions, 14 deletions
diff --git a/src/libdiskfs/cache.c b/src/libdiskfs/cache.c index cdef865e..f1af6f1b 100644 --- a/src/libdiskfs/cache.c +++ b/src/libdiskfs/cache.c @@ -145,7 +145,7 @@ diskcachereadbig(DiskCache *d, u64int offset) lock(&d->lk); dcb = findblock(d, offset); if(dcb){ -//fprint(2, "found %llud in cache %p\n", (uvlong)offset, dcb); +/*fprint(2, "found %llud in cache %p\n", (uvlong)offset, dcb);*/ if(dcb->ref++ == 0) delfromlru(d, dcb); unlock(&d->lk); @@ -165,7 +165,7 @@ diskcachereadbig(DiskCache *d, u64int offset) putlru(d, dcb); dcb = nil; }else{ -//fprint(2, "read %llud from disk %p\n", (uvlong)offset, dcb); +/*fprint(2, "read %llud from disk %p\n", (uvlong)offset, dcb); */ dcb->subblock = b; dcb->ref++; addtohash(d, dcb, offset); @@ -223,7 +223,7 @@ diskcacheread(Disk *dd, u32int len, u64int offset) len = dlen-frag; } b->len = len; -//fprint(2, "offset %llud at pointer %p %lux\n", (uvlong)offset, b->data, *(ulong*)(b->data+4)); +/*fprint(2, "offset %llud at pointer %p %lux\n", (uvlong)offset, b->data, *(ulong*)(b->data+4)); */ return b; } diff --git a/src/libdiskfs/ext2.c b/src/libdiskfs/ext2.c index b6b9773d..41ebfcee 100644 --- a/src/libdiskfs/ext2.c +++ b/src/libdiskfs/ext2.c @@ -111,8 +111,8 @@ ext2blockread(Fsys *fsys, u64int vbno) fprint(2, "loading group: %r..."); return nil; } -// if(debug) -// fprint(2, "group %d bitblock=%d...", bno/fs->blockspergroup, g->bitblock); +/* if(debug) */ +/* fprint(2, "group %d bitblock=%d...", bno/fs->blockspergroup, g->bitblock); */ if((bitb = diskread(fs->disk, fs->blocksize, (u64int)g->bitblock*fs->blocksize)) == nil){ if(debug) diff --git a/src/libdiskfs/ext2.h b/src/libdiskfs/ext2.h index 29bf60b5..d0503b40 100644 --- a/src/libdiskfs/ext2.h +++ b/src/libdiskfs/ext2.h @@ -44,7 +44,7 @@ enum IFREG = 0100000, IFLNK = 0120000, IFSOCK = 0140000, - IFWHT = 0160000, + IFWHT = 0160000 }; #define DIRLEN(namlen) (((namlen)+8+3)&~3) @@ -144,7 +144,7 @@ struct Dirent }; enum { - MinDirentSize = 4+2+1+1, + MinDirentSize = 4+2+1+1 }; /* diff --git a/src/libdiskfs/ffs.c b/src/libdiskfs/ffs.c index 3ae65a88..099c7bbd 100644 --- a/src/libdiskfs/ffs.c +++ b/src/libdiskfs/ffs.c @@ -164,9 +164,9 @@ okay: blockput(cgb); goto error; } - // cg->nfrag = cgblk->nfrag; - // cg->nblock = (cgblk->nfrag+fs->fragsperblock-1) / fs->fragsperblock; - // fprint(2, "cg #%d: cgblk %lud, %d blocks, %d inodes\n", cgblk->num, (ulong)cg->cgblkno, cg->nblock, cg->nino); + /* cg->nfrag = cgblk->nfrag; */ + /* cg->nblock = (cgblk->nfrag+fs->fragsperblock-1) / fs->fragsperblock; */ + /* fprint(2, "cg #%d: cgblk %lud, %d blocks, %d inodes\n", cgblk->num, (ulong)cg->cgblkno, cg->nblock, cg->nino); */ } } blockput(b); diff --git a/src/libdiskfs/ffs.h b/src/libdiskfs/ffs.h index 4a90aef2..6a5a387d 100644 --- a/src/libdiskfs/ffs.h +++ b/src/libdiskfs/ffs.h @@ -100,7 +100,7 @@ enum DTREG = 8, DTLNK = 10, DTSOCK = 12, - DTWHT = 14, + DTWHT = 14 }; struct Cylsum diff --git a/src/libdiskfs/file.c b/src/libdiskfs/file.c index 6843e341..d829578e 100644 --- a/src/libdiskfs/file.c +++ b/src/libdiskfs/file.c @@ -21,7 +21,7 @@ preadn(int fd, void *vdata, u32int ulen, u64int offset) nfilereads++; len = ulen; data = vdata; -// fprint(2, "readn 0x%llux 0x%ux\n", offset, ulen); +/* fprint(2, "readn 0x%llux 0x%ux\n", offset, ulen); */ while(len > 0){ n = pread(fd, data, len, offset); if(n <= 0) diff --git a/src/libdiskfs/venti.c b/src/libdiskfs/venti.c index 5d8528c2..cf246f98 100644 --- a/src/libdiskfs/venti.c +++ b/src/libdiskfs/venti.c @@ -56,14 +56,14 @@ _vtfileblock(VtCache *c, VtEntry *e, u32int bn) return nil; } -//fprint(2, "vtread %V\n", e->score); +/*fprint(2, "vtread %V\n", e->score); */ b = vtcacheglobal(c, e->score, e->type); if(b == nil) return nil; for(i=d-1; i>=0; i--){ t = VtDataType+i; -//fprint(2, "vtread %V\n", b->data+index[i]*VtScoreSize); +/*fprint(2, "vtread %V\n", b->data+index[i]*VtScoreSize); */ bb = vtcacheglobal(c, b->data+index[i]*VtScoreSize, t); vtblockput(b); if(bb == nil) |