sam: use get9root instead of duplicating the logic
This commit is contained in:
@@ -152,9 +152,7 @@ rescue(void)
|
|||||||
free(c);
|
free(c);
|
||||||
}else
|
}else
|
||||||
sprint(buf, "nameless.%d", nblank++);
|
sprint(buf, "nameless.%d", nblank++);
|
||||||
root = getenv("PLAN9");
|
root = get9root();
|
||||||
if(root == nil)
|
|
||||||
root = "/usr/local/plan9";
|
|
||||||
fprint(io, "#!/bin/sh\n%s/bin/samsave '%s' $* <<'---%s'\n", root, buf, buf);
|
fprint(io, "#!/bin/sh\n%s/bin/samsave '%s' $* <<'---%s'\n", root, buf, buf);
|
||||||
addr.r.p1 = 0, addr.r.p2 = f->b.nc;
|
addr.r.p1 = 0, addr.r.p2 = f->b.nc;
|
||||||
writeio(f);
|
writeio(f);
|
||||||
|
|||||||
Reference in New Issue
Block a user