From the Go release: Bfdopen(). Notes: Thu Dec 15 13:58:56 EST 2011 geoff apparently no longer needed. Reference: /n/sources/patch/sorry/bio-bfdopen Date: Sat Aug 6 07:50:17 CES 2011 Signed-off-by: lucio@proxima.alt.za Reviewed-by: geoff --- /sys/include/bio.h Sat Aug 6 07:49:27 2011 +++ /sys/include/bio.h Sat Aug 6 07:49:20 2011 @@ -48,6 +48,7 @@ #define BFILDES(bp) Bfildes(bp) int Bbuffered(Biobufhdr*); +Biobuf* Bfdopen(int, int); int Bfildes(Biobufhdr*); int Bflush(Biobufhdr*); int Bgetc(Biobufhdr*); --- /sys/src/libbio/binit.c Sat Aug 6 07:49:39 2011 +++ /sys/src/libbio/binit.c Sat Aug 6 07:49:32 2011 @@ -94,6 +94,19 @@ } Biobuf* +Bfdopen(int f, int mode) +{ + Biobuf *bp; + + bp = malloc(sizeof(Biobuf)); + if(bp == 0) + return 0; + Binits(bp, f, mode, bp->b, sizeof(bp->b)); + bp->flag = Bmagic; + return bp; +} + +Biobuf* Bopen(char *name, int mode) { Biobuf *bp;