diff options
author | rsc <devnull@localhost> | 2005-01-18 05:25:09 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-01-18 05:25:09 +0000 |
commit | adbb83845c5d3cb02343d7613cfb8385aa909909 (patch) | |
tree | 6f2b79ae89f59d014cdbfb6a5bf5ded94bf775fa /src/cmd/venti/write.c | |
parent | d338028eeb45434dab651466dcd664091517e087 (diff) | |
download | plan9port-adbb83845c5d3cb02343d7613cfb8385aa909909.tar.gz plan9port-adbb83845c5d3cb02343d7613cfb8385aa909909.tar.bz2 plan9port-adbb83845c5d3cb02343d7613cfb8385aa909909.zip |
remove venti for now
Diffstat (limited to 'src/cmd/venti/write.c')
-rw-r--r-- | src/cmd/venti/write.c | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/src/cmd/venti/write.c b/src/cmd/venti/write.c deleted file mode 100644 index 94b61be4..00000000 --- a/src/cmd/venti/write.c +++ /dev/null @@ -1,60 +0,0 @@ -#include "stdinc.h" -#include "dat.h" -#include "fns.h" - -char *host; - -void -usage(void) -{ - fprint(2, "usage: write [-z] [-h host] [-t type] <datablock\n"); - threadexitsall("usage"); -} - -void -threadmain(int argc, char *argv[]) -{ - uchar *p, score[VtScoreSize]; - int type, n, dotrunc; - VtConn *z; - - dotrunc = 0; - type = VtDataType; - ARGBEGIN{ - case 'z': - dotrunc = 1; - break; - case 'h': - host = EARGF(usage()); - break; - case 't': - type = atoi(EARGF(usage())); - break; - default: - usage(); - break; - }ARGEND - - if(argc != 0) - usage(); - - - fmtinstall('V', vtscorefmt); - - p = ezmalloc(VtMaxLumpSize+1); - n = readn(0, p, VtMaxLumpSize+1); - if(n > VtMaxLumpSize) - sysfatal("data too big"); - z = vtdial(host); - if(z == nil) - sysfatal("could not connect to server: %r"); - if(vtconnect(z) < 0) - sysfatal("vtconnect: %r"); - if(dotrunc) - n = vtzerotruncate(type, p, n); - if(vtwrite(z, score, type, p, n) < 0) - sysfatal("vtwrite: %r"); - vthangup(z); - print("%V\n", score); - threadexitsall(0); -} |