aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/vac
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-04-01 19:24:03 +0000
committerrsc <devnull@localhost>2006-04-01 19:24:03 +0000
commitcbeb0b26e4c7caa8d1b47de791a7418dc20a4567 (patch)
treee0f7e445de1aa22a42ef873dc4b1118a8105ae93 /src/cmd/vac
parent226d80b8213821af0cbf092d1507c52b504fd368 (diff)
downloadplan9port-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/cmd/vac')
-rw-r--r--src/cmd/vac/dat.h2
-rw-r--r--src/cmd/vac/file.c12
-rw-r--r--src/cmd/vac/rtest.c2
-rw-r--r--src/cmd/vac/srcload.c4
-rw-r--r--src/cmd/vac/vac-orig.c4
-rw-r--r--src/cmd/vac/vac.c4
-rw-r--r--src/cmd/vac/vac.h6
-rw-r--r--src/cmd/vac/vacfs.c8
-rw-r--r--src/cmd/vac/wtest.c2
9 files changed, 22 insertions, 22 deletions
diff --git a/src/cmd/vac/dat.h b/src/cmd/vac/dat.h
index 869ea7a2..1967c436 100644
--- a/src/cmd/vac/dat.h
+++ b/src/cmd/vac/dat.h
@@ -7,7 +7,7 @@ enum {
BytesPerEntry = 100, /* estimate of bytes per dir entries - determines number of index entries in the block */
FullPercentage = 80, /* don't allocate in block if more than this percentage full */
FlushSize = 200, /* number of blocks to flush */
- DirtyPercentage = 50, /* maximum percentage of dirty blocks */
+ DirtyPercentage = 50 /* maximum percentage of dirty blocks */
};
diff --git a/src/cmd/vac/file.c b/src/cmd/vac/file.c
index e5629aed..893d6a82 100644
--- a/src/cmd/vac/file.c
+++ b/src/cmd/vac/file.c
@@ -917,12 +917,12 @@ vacfilesetdir(VacFile *f, VacDir *dir, char *uid)
f->dir.mtime = dir->mtime;
f->dir.atime = dir->atime;
-//fprint(2, "mode %x %x ", f->dir.mode, dir->mode);
+/*fprint(2, "mode %x %x ", f->dir.mode, dir->mode); */
mask = ~(ModeDir|ModeSnapshot);
f->dir.mode &= ~mask;
f->dir.mode |= mask & dir->mode;
f->dirty = 1;
-//fprint(2, "->%x\n", f->dir.mode);
+/*fprint(2, "->%x\n", f->dir.mode); */
filemetaflush2(f, oelem);
vtfree(oelem);
@@ -1138,7 +1138,7 @@ fprint(2, "fileMetaFlush moving entry from %ud -> %ud\n", f->boff, boff);
bb = vtfileblock(fp->msource, f->boff, VtORDWR);
mbdelete(&mb, i, &me);
mbpack(&mb);
-// blockDependency(b, bb, -1, nil, nil);
+/* blockDependency(b, bb, -1, nil, nil); */
vtblockput(bb);
/* vtblockdirty(b); */
vtblockput(b);
@@ -1641,7 +1641,7 @@ chksource(VacFile *f)
static int
filerlock(VacFile *f)
{
-// assert(!canwlock(&f->fs->elk));
+/* assert(!canwlock(&f->fs->elk)); */
rlock(&f->lk);
if(chksource(f) < 0){
runlock(&f->lk);
@@ -1659,7 +1659,7 @@ filerunlock(VacFile *f)
static int
filelock(VacFile *f)
{
-// assert(!canwlock(&f->fs->elk));
+/* assert(!canwlock(&f->fs->elk)); */
wlock(&f->lk);
if(chksource(f) < 0){
wunlock(&f->lk);
@@ -1683,7 +1683,7 @@ static void
filemetalock(VacFile *f)
{
assert(f->up != nil);
-// assert(!canwlock(&f->fs->elk));
+/* assert(!canwlock(&f->fs->elk)); */
wlock(&f->up->lk);
}
diff --git a/src/cmd/vac/rtest.c b/src/cmd/vac/rtest.c
index d45cd0fe..81143337 100644
--- a/src/cmd/vac/rtest.c
+++ b/src/cmd/vac/rtest.c
@@ -2,7 +2,7 @@
enum {
Nblock = 300000,
- BlockSize = 8*1024,
+ BlockSize = 8*1024
};
uchar data[Nblock*VtScoreSize];
diff --git a/src/cmd/vac/srcload.c b/src/cmd/vac/srcload.c
index 5dec719f..8f3b2a0c 100644
--- a/src/cmd/vac/srcload.c
+++ b/src/cmd/vac/srcload.c
@@ -89,12 +89,12 @@ stats(r);
}
fprint(2, "count = %d top = %lud\n", count(r, 0), sourceGetDirSize(r));
-// cacheCheck(c);
+/* cacheCheck(c); */
fprint(2, "deleting\n");
for(i=0; i<num; i++)
delete(r);
-// dump(r, 0, 0);
+/* dump(r, 0, 0); */
lumpDecRef(r->lump, 0);
sourceRemove(r);
diff --git a/src/cmd/vac/vac-orig.c b/src/cmd/vac/vac-orig.c
index c38365be..637c49c0 100644
--- a/src/cmd/vac/vac-orig.c
+++ b/src/cmd/vac/vac-orig.c
@@ -73,7 +73,7 @@ void plan9ToVacDir(VacDir*, Dir*, ulong entry, uvlong qid);
enum {
Version = 8,
BlockSize = 8*1024,
- MaxExclude = 1000,
+ MaxExclude = 1000
};
struct {
@@ -190,7 +190,7 @@ main(int argc, char *argv[])
if(statsFlag)
fprint(2, "files %ld:%ld data %ld:%ld:%ld meta %ld\n", stats.file, stats.sfile,
stats.data, stats.skip, stats.sdata, stats.meta);
-//packetStats();
+/*packetStats(); */
vtClose(z);
vtDetach();
diff --git a/src/cmd/vac/vac.c b/src/cmd/vac/vac.c
index 9ff3d12a..4848d7ce 100644
--- a/src/cmd/vac/vac.c
+++ b/src/cmd/vac/vac.c
@@ -77,7 +77,7 @@ void plan9tovacdir(VacDir*, Dir*, ulong entry, uvlong qid);
enum {
Version = 8,
BlockSize = 8*1024,
- MaxExclude = 1000,
+ MaxExclude = 1000
};
struct {
@@ -202,7 +202,7 @@ threadmain(int argc, char *argv[])
if(statsflag)
fprint(2, "files %ld:%ld data %ld:%ld:%ld meta %ld\n", stats.file, stats.sfile,
stats.data, stats.skip, stats.sdata, stats.meta);
-//packetStats();
+/*packetStats(); */
vthangup(z);
threadexitsall(0);
diff --git a/src/cmd/vac/vac.h b/src/cmd/vac/vac.h
index 9d0cf525..6d5a8205 100644
--- a/src/cmd/vac/vac.h
+++ b/src/cmd/vac/vac.h
@@ -30,7 +30,7 @@ enum
ModeTemporary = (1<<19), /* MS-DOS */
ModeSnapshot = (1<<20), /* read only snapshot */
ModeDevice = (1<<21), /* Unix device */
- ModeNamedPipe = (1<<22), /* Unix named pipe */
+ ModeNamedPipe = (1<<22) /* Unix named pipe */
};
enum
@@ -39,7 +39,7 @@ enum
MetaHeaderSize = 12,
MetaIndexSize = 4,
IndexEntrySize = 8,
- DirMagic = 0x1c4d9072,
+ DirMagic = 0x1c4d9072
};
enum
@@ -47,7 +47,7 @@ enum
DirPlan9Entry = 1, /* not valid in version >= 9 */
DirNTEntry, /* not valid in version >= 9 */
DirQidSpaceEntry,
- DirGenEntry, /* not valid in version >= 9 */
+ DirGenEntry /* not valid in version >= 9 */
};
struct VacDir
diff --git a/src/cmd/vac/vacfs.c b/src/cmd/vac/vacfs.c
index 17d0903c..24758459 100644
--- a/src/cmd/vac/vacfs.c
+++ b/src/cmd/vac/vacfs.c
@@ -9,12 +9,12 @@ typedef struct DirBuf DirBuf;
enum
{
- OPERM = 0x3, /* mask of all permission types in open mode */
+ OPERM = 0x3 /* mask of all permission types in open mode */
};
enum
{
- DirBufSize = 20,
+ DirBufSize = 20
};
struct Fid
@@ -46,7 +46,7 @@ enum
Pread = 4,
Pother = 1,
Pgroup = 8,
- Powner = 64,
+ Powner = 64
};
Fid *fids;
@@ -59,7 +59,7 @@ Fcall rhdr;
Fcall thdr;
VacFs *fs;
VtConn *conn;
-// VtSession *session;
+/* VtSession *session; */
int noperm;
int dotu;
diff --git a/src/cmd/vac/wtest.c b/src/cmd/vac/wtest.c
index 3cc15e9c..35dc8233 100644
--- a/src/cmd/vac/wtest.c
+++ b/src/cmd/vac/wtest.c
@@ -2,7 +2,7 @@
enum {
Nblock = 10000,
- BlockSize = 8*1024,
+ BlockSize = 8*1024
};
uchar data[Nblock*BlockSize];