aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/rc/io.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-03-04 02:36:36 +0000
committerrsc <devnull@localhost>2004-03-04 02:36:36 +0000
commit0b917997919b470edc949b0cf7af62f160885f5e (patch)
tree293bba61e3ccdf7b30d33b491e2d0a0e1a397e15 /src/cmd/rc/io.c
parent1ae0de511a26ab944bccf7eba89c3718697cd366 (diff)
downloadplan9port-0b917997919b470edc949b0cf7af62f160885f5e.tar.gz
plan9port-0b917997919b470edc949b0cf7af62f160885f5e.tar.bz2
plan9port-0b917997919b470edc949b0cf7af62f160885f5e.zip
Fix rc not to bus error on Mac OS X.
Don't print about child notes either.
Diffstat (limited to 'src/cmd/rc/io.c')
-rw-r--r--src/cmd/rc/io.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cmd/rc/io.c b/src/cmd/rc/io.c
index cf143b0f..61256102 100644
--- a/src/cmd/rc/io.c
+++ b/src/cmd/rc/io.c
@@ -126,10 +126,13 @@ void flush(io *f)
}
}
io *openfd(int fd){
- io *f=new(struct io);
+ io *f;
+fprint(2, "in openfd\n");
+ f=new(struct io);
f->fd=fd;
f->bufp=f->ebuf=f->buf;
f->strp=0;
+fprint(2, "in openfd\n");
return f;
}
io *openstr(void){
@@ -155,6 +158,7 @@ io *opencore(char *s, int len)
Memcpy(buf, s, len);
return f;
}
+/*
void rewind(io *io)
{
if(io->fd==-1) io->bufp=io->strp;
@@ -163,6 +167,7 @@ void rewind(io *io)
Seek(io->fd, 0L, 0);
}
}
+*/
void closeio(io *io)
{
if(io->fd>=0) close(io->fd);