diff options
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/vac/file.c | 2 | ||||
-rw-r--r-- | src/cmd/vac/unvac.c | 11 | ||||
-rw-r--r-- | src/cmd/vac/vacfs.c | 26 |
3 files changed, 7 insertions, 32 deletions
diff --git a/src/cmd/vac/file.c b/src/cmd/vac/file.c index 5e51c84a..b7384b7f 100644 --- a/src/cmd/vac/file.c +++ b/src/cmd/vac/file.c @@ -354,7 +354,7 @@ _fileopen(VacFs *fs, char *path, int partial) elem[n] = 0; ff = _filewalk(f, elem, partial && *p=='\0'); if(ff == nil){ - werrstr("%.*s: %R", utfnlen(opath, p-opath), opath); + werrstr("%.*s: %r", utfnlen(opath, p-opath), opath); goto Err; } vacfiledecref(f); diff --git a/src/cmd/vac/unvac.c b/src/cmd/vac/unvac.c index a2ac2155..24165ae1 100644 --- a/src/cmd/vac/unvac.c +++ b/src/cmd/vac/unvac.c @@ -1,7 +1,5 @@ #include "stdinc.h" -#include <auth.h> -#include <fcall.h> -#include <thread.h> +#include <fcall.h> /* dirmodefmt */ #include "vac.h" VacFs *fs; @@ -35,7 +33,7 @@ threadmain(int argc, char *argv[]) fmtinstall('H', encodefmt); fmtinstall('V', vtscorefmt); fmtinstall('F', vtfcallfmt); - fmtinstall('T', mtimefmt); + fmtinstall('t', mtimefmt); fmtinstall('M', dirmodefmt); host = nil; @@ -141,7 +139,8 @@ void unvac(VacFile *f, char *name, VacDir *vdir) { static char buf[65536]; - int fd, mode, n, mode9; + int fd, n; + ulong mode, mode9; char *newname; char *what; vlong off; @@ -175,7 +174,7 @@ unvac(VacFile *f, char *name, VacDir *vdir) mode9 |= DMSETGID; if(mode&ModeDevice) mode9 |= DMDEVICE; - print("%M %-10s %-10s %11lld %T %s\n", + print("%M %-10s %-10s %11lld %t %s\n", mode9, vdir->uid, vdir->gid, vdir->size, vdir->mtime, name); }else diff --git a/src/cmd/vac/vacfs.c b/src/cmd/vac/vacfs.c index 1ce3e2df..92349ed2 100644 --- a/src/cmd/vac/vacfs.c +++ b/src/cmd/vac/vacfs.c @@ -1,7 +1,5 @@ #include "stdinc.h" -#include <auth.h> #include <fcall.h> -#include <thread.h> #include "vac.h" typedef struct Fid Fid; @@ -508,29 +506,7 @@ rread(Fid *f) char* rwrite(Fid *f) { - char *buf; - vlong off; - int cnt; - VacFile *vf; - - if(!f->busy) - return vtstrdup(Enotexist); - vf = f->file; - thdr.count = 0; - off = rhdr.offset; - buf = rhdr.data; - cnt = rhdr.count; - if(f->qid.type & QTDIR) - return "file is a directory"; - thdr.count = vacfilewrite(vf, buf, cnt, off, "none"); - if(thdr.count < 0) { - char err[80]; - - rerrstr(err, sizeof err); -fprint(2, "write failed: %s\n", err); - return vtstrdup(err); - } - return 0; + return vtstrdup(Erdonly); } char * |