9 // XXX What to do here?
10 VtMaxLumpSize = 65535,
16 fprint(2, "usage: root [-h host] score\n");
17 threadexitsall("usage");
21 threadmain(int argc, char *argv[])
24 uchar score[VtScoreSize];
30 fmtinstall('F', vtfcallfmt);
31 fmtinstall('V', vtscorefmt);
37 host = EARGF(usage());
47 buf = vtmallocz(VtMaxLumpSize);
51 sysfatal("could not connect to server: %r");
54 sysfatal("vtconnect: %r");
56 for(i=0; i<argc; i++){
57 if(vtparsescore(argv[i], nil, score) < 0){
58 fprint(2, "cannot parse score '%s': %r\n", argv[i]);
61 n = vtread(z, score, VtRootType, buf, VtMaxLumpSize);
63 fprint(2, "could not read block %V: %r\n", score);
67 fprint(2, "block %V is wrong size %d != 300\n", score, n);
70 if(vtrootunpack(&root, buf) < 0){
71 fprint(2, "unpacking block %V: %r\n", score);
74 print("%V: %q %q %V %d %V\n", score, root.name, root.type, root.score, root.blocksize, root.prev);