]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/libbio/bgetc.c
bio: add support for custom I/O handler via Biofn
[plan9front.git] / sys / src / libbio / bgetc.c
index 0cabc0716af5ced06422e4fe93ebbe0674ede872..c8f7163688e6c0b14e7fb2ba3faaa00fbdcae364 100644 (file)
@@ -24,7 +24,7 @@ loop:
         * buffer to allow that many ungets.
         */
        memmove(bp->bbuf-Bungetsize, bp->ebuf-Bungetsize, Bungetsize);
-       i = read(bp->fid, bp->bbuf, bp->bsize);
+       i = bp->iof(bp, bp->bbuf, bp->bsize);
        bp->gbuf = bp->bbuf;
        if(i <= 0) {
                bp->state = Bracteof;