8 fprint(2, "usage: fmtisect [-1Z] [-b blocksize] name file\n");
13 threadmain(int argc, char *argv[])
19 int blocksize, setsize, zero;
30 blocksize = unittoull(ARGF());
33 if(blocksize > MaxDiskBlock){
34 fprint(2, "block size too large, max %d\n", MaxDiskBlock);
35 threadexitsall("usage");
50 if(vers == ISectVersion1)
63 sysfatal("illegal name %s", name);
65 part = initpart(file, ORDWR|ODIRECT);
67 sysfatal("can't open partition %s: %r", file);
70 zeropart(part, blocksize);
72 is = newisect(part, vers, name, blocksize, setsize);
74 sysfatal("can't initialize new index: %r");
76 fprint(2, "fmtisect %s: %,d buckets of %,d entries, %,d bytes for index map\n",
77 file, is->blocks, is->buckmax, setsize);
80 fprint(2, "can't write back index section header for %s: %r\n", file);