summaryrefslogtreecommitdiffstats
path: root/src/cmd/sam/io.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2003-09-30 19:05:50 +0000
committerrsc <devnull@localhost>2003-09-30 19:05:50 +0000
commit522b0689c340d26feeac360640bf7e2e0582353c (patch)
treeba3a550c28684be3b3997899528a110c4e9cd91a /src/cmd/sam/io.c
parent2df2758496b2ab508d349208449f04d85ae2eb2c (diff)
downloadplan9port-522b0689c340d26feeac360640bf7e2e0582353c.tar.gz
plan9port-522b0689c340d26feeac360640bf7e2e0582353c.zip
Reorg
Diffstat (limited to 'src/cmd/sam/io.c')
-rw-r--r--src/cmd/sam/io.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/cmd/sam/io.c b/src/cmd/sam/io.c
index 236090a0..c0669631 100644
--- a/src/cmd/sam/io.c
+++ b/src/cmd/sam/io.c
@@ -53,7 +53,7 @@ writef(File *f)
error(Eappend);
n = writeio(f);
if(f->name.s[0]==0 || samename){
- if(addr.r.p1==0 && addr.r.p2==f->_.nc)
+ if(addr.r.p1==0 && addr.r.p2==f->b.nc)
f->cleanseq = f->seq;
state(f, f->cleanseq==f->seq? Clean : Dirty);
}
@@ -87,7 +87,7 @@ readio(File *f, int *nulls, int setdate, int toterm)
*nulls = FALSE;
b = 0;
if(f->unread){
- nt = bufload(f, 0, io, nulls);
+ nt = bufload(&f->b, 0, io, nulls);
if(toterm)
raspload(f);
}else
@@ -149,7 +149,7 @@ writeio(File *f)
n = BLOCKSIZE;
else
n = addr.r.p2-p;
- bufread(f, p, genbuf, n);
+ bufread(&f->b, p, genbuf, n);
c = Strtoc(tmprstr(genbuf, n));
m = strlen(c);
if(Write(io, c, m) != m){
@@ -188,8 +188,7 @@ bootterm(char *machine, char **argv, char **end)
argv[0] = "samterm";
*end = 0;
exec(samterm, argv);
- fprint(2, "can't exec: ");
- perror(samterm);
+ fprint(2, "can't exec %s: %r\n", samterm);
_exits("damn");
}
if(pipe(ph2t)==-1 || pipe(pt2h)==-1)