summaryrefslogtreecommitdiffstats
path: root/src/cmd/venti/syncindex.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-01-18 05:25:09 +0000
committerrsc <devnull@localhost>2005-01-18 05:25:09 +0000
commitadbb83845c5d3cb02343d7613cfb8385aa909909 (patch)
tree6f2b79ae89f59d014cdbfb6a5bf5ded94bf775fa /src/cmd/venti/syncindex.c
parentd338028eeb45434dab651466dcd664091517e087 (diff)
downloadplan9port-adbb83845c5d3cb02343d7613cfb8385aa909909.tar.gz
plan9port-adbb83845c5d3cb02343d7613cfb8385aa909909.zip
remove venti for now
Diffstat (limited to 'src/cmd/venti/syncindex.c')
-rw-r--r--src/cmd/venti/syncindex.c56
1 files changed, 0 insertions, 56 deletions
diff --git a/src/cmd/venti/syncindex.c b/src/cmd/venti/syncindex.c
deleted file mode 100644
index 75bb0696..00000000
--- a/src/cmd/venti/syncindex.c
+++ /dev/null
@@ -1,56 +0,0 @@
-#include "stdinc.h"
-#include "dat.h"
-#include "fns.h"
-
-static int verbose;
-void
-usage(void)
-{
- fprint(2, "usage: syncindex [-fv] [-B blockcachesize] config\n");
- threadexitsall("usage");
-}
-
-void
-threadmain(int argc, char *argv[])
-{
- u32int bcmem;
- int fix;
-
- fix = 0;
- bcmem = 0;
- ARGBEGIN{
- case 'B':
- bcmem = unittoull(ARGF());
- break;
- case 'f':
- fix++;
- break;
- case 'v':
- verbose++;
- break;
- default:
- usage();
- break;
- }ARGEND
-
- if(!fix)
- readonly = 1;
-
- if(argc != 1)
- usage();
-
- if(initventi(argv[0]) < 0)
- sysfatal("can't init venti: %r");
-
- if(bcmem < maxblocksize * (mainindex->narenas + mainindex->nsects * 4 + 16))
- bcmem = maxblocksize * (mainindex->narenas + mainindex->nsects * 4 + 16);
- fprint(2, "initialize %d bytes of disk block cache\n", bcmem);
- initdcache(bcmem);
-
- if(verbose)
- printindex(2, mainindex);
- if(syncindex(mainindex, fix) < 0)
- sysfatal("failed to sync index=%s: %r\n", mainindex->name);
-
- threadexitsall(0);
-}