From 04b29c1c92c3b38bc33bb1777400d00c0e2681a0 Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Thu, 21 May 2009 20:02:52 +0000 Subject: 20090521-2101 --- appl/cmd/vacfs.b | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'appl/cmd') diff --git a/appl/cmd/vacfs.b b/appl/cmd/vacfs.b index 5fffc98d..54e9b57b 100644 --- a/appl/cmd/vacfs.b +++ b/appl/cmd/vacfs.b @@ -158,6 +158,8 @@ walk(ed: ref Elem.Dir, name: string): (ref Elem, string) if(ne == nil) { nqid := childput(ed.qid, de.qid); ne = Elem.new(nqid, ed.vd, de, ed.qid); + if(ne == nil) + return (nil, sprint("%r")); set(ne); } return (ne, nil); @@ -204,14 +206,15 @@ init(nil: ref Draw->Context, args: list of string) styx = load Styx Styx->PATH; styxservers = load Styxservers Styxservers->PATH; vac = load Vac Vac->PATH; - if(venti == nil || vac == nil) - error("loading venti,vac"); - sys->pctl(sys->NEWPGRP, nil); venti->init(); vac->init(); styx->init(); styxservers->init(styx); + sys->pctl(sys->NEWPGRP, nil); + if(venti == nil || vac == nil) + error("loading venti,vac"); + arg->init(args); arg->setusage(arg->progname()+" [-Ddp] [-a addr] [[tag:]score]"); while((ch := arg->opt()) != 0) @@ -402,6 +405,10 @@ loop: if(ne == nil) { nqid := childput(ed.qid, de.qid); ne = Elem.new(nqid, ed.vd, de, ed.qid); + if(ne == nil) { + n.reply <-= (nil, sprint("%r")); + continue loop; + } } d := ne.stat(); ed.prev[ed.nprev++] = d; -- cgit v1.2.3