sam: use get9root instead of duplicating the logic
This commit is contained in:
parent
521fc08180
commit
c53230037a
1 changed files with 1 additions and 3 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue