henesyinit from p9fce6d0435 years agoHistory
18 lines · 279 B · C
RawDownload
#include	<u.h>#include	<libc.h>#include	<bio.h> intBbuffered(Biobufhdr *bp){	switch(bp->state) {	case Bracteof:	case Bractive:		return -bp->icount; 	case Bwactive:		return bp->bsize + bp->ocount;	}	fprint(2, "Bbuffered: unknown state %d\n", bp->state);	return 0;}