10 fprint(2, "usage: root [-h host] score\n");
11 threadexitsall("usage");
15 threadmain(int argc, char *argv[])
18 uchar score[VtScoreSize];
24 fmtinstall('F', vtfcallfmt);
25 fmtinstall('V', vtscorefmt);
31 host = EARGF(usage());
41 buf = vtmallocz(VtMaxLumpSize);
45 sysfatal("could not connect to server: %r");
48 sysfatal("vtconnect: %r");
50 for(i=0; i<argc; i++){
51 if(vtparsescore(argv[i], nil, score) < 0){
52 fprint(2, "cannot parse score '%s': %r\n", argv[i]);
55 n = vtread(z, score, VtRootType, buf, VtMaxLumpSize);
57 fprint(2, "could not read block %V: %r\n", score);
61 fprint(2, "block %V is wrong size %d != 300\n", score, n);
64 if(vtrootunpack(&root, buf) < 0){
65 fprint(2, "unpacking block %V: %r\n", score);
68 print("%V: %q %q %V %d %V\n", score, root.name, root.type, root.score, root.blocksize, root.prev);