aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/samterm/mesg.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2003-10-11 02:45:02 +0000
committerrsc <devnull@localhost>2003-10-11 02:45:02 +0000
commit941c9f36a9230690989f495313a399af5192ef5c (patch)
tree3cf12a8041aa91159007bd5e36ed02a3a27e7ee6 /src/cmd/samterm/mesg.c
parent079d45c20eb7fc6ec398c602798888a39000da68 (diff)
downloadplan9port-941c9f36a9230690989f495313a399af5192ef5c.tar.gz
plan9port-941c9f36a9230690989f495313a399af5192ef5c.tar.bz2
plan9port-941c9f36a9230690989f495313a399af5192ef5c.zip
Tweaks to make it work on Unix.
Diffstat (limited to 'src/cmd/samterm/mesg.c')
-rw-r--r--src/cmd/samterm/mesg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cmd/samterm/mesg.c b/src/cmd/samterm/mesg.c
index 0971ee2e..c332d7a8 100644
--- a/src/cmd/samterm/mesg.c
+++ b/src/cmd/samterm/mesg.c
@@ -16,6 +16,7 @@ uchar indata[DATASIZE+1]; /* room for NUL */
uchar outdata[DATASIZE];
short outcount;
int hversion;
+int hostfd[2];
void inmesg(Hmesg, int);
int inshort(int);
@@ -510,7 +511,7 @@ outsend(void)
panic("outcount>sizeof outdata");
outdata[1]=outcount;
outdata[2]=outcount>>8;
- if(write(1, (char *)outdata, outcount+HSIZE)!=outcount+HSIZE)
+ if(write(hostfd[1], (char *)outdata, outcount+HSIZE)!=outcount+HSIZE)
panic("write error");
}
@@ -651,7 +652,7 @@ hsetsnarf(int nc)
s1[n] = 0;
snarflen = n;
outTs(Tsetsnarf, n);
- if(n>0 && write(1, s1, n)!=n)
+ if(n>0 && write(hostfd[1], s1, n)!=n)
panic("snarf write error");
free(s1);
}else