diff --git a/sys/include/bio.h b/sys/include/bio.h index 2a874de31..2c5cdc8cf 100644 --- a/sys/include/bio.h +++ b/sys/include/bio.h @@ -34,6 +34,7 @@ struct Biobufhdr uchar* gbuf; /* pointer to good data in buf */ void (*errorf)(char *); /* called on error if not nil */ int (*iof)(Biobufhdr*, void *, long); /* called to do i/o */ + void *aux; /* user data */ }; struct Biobuf diff --git a/sys/man/2/bio b/sys/man/2/bio index b62a5877d..8c63870cb 100644 --- a/sys/man/2/bio +++ b/sys/man/2/bio @@ -1,6 +1,6 @@ .TH BIO 2 .SH NAME -Bopen, Bfdopen, Binit, Binits, Brdline, Brdstr, Bgetc, Bgetrune, Bgetd, Bungetc, Bungetrune, Bread, Bseek, Boffset, Bfildes, Blinelen, Bputc, Bputrune, Bprint, Bvprint, Bwrite, Bflush, Bterm, Bbuffered, Blethal \- buffered input/output +Bopen, Bfdopen, Binit, Binits, Brdline, Brdstr, Bgetc, Bgetrune, Bgetd, Bungetc, Bungetrune, Bread, Bseek, Boffset, Bfildes, Blinelen, Bputc, Bputrune, Bprint, Bvprint, Bwrite, Bflush, Bterm, Bbuffered, Blethal, Biofn \- buffered input/output .SH SYNOPSIS .ta \w'Biobuf* 'u .B #include @@ -9,6 +9,16 @@ Bopen, Bfdopen, Binit, Binits, Brdline, Brdstr, Bgetc, Bgetrune, Bgetd, Bungetc, .br .B #include .PP +.ft L +.nf +.ta \w' 'u +\w' 'u +\w' 'u +\w' 'u +\w' 'u +typedef struct Biobufhdr Biobufhdr; +struct Biobufhdr { + void *aux; /* user data */ + ... /* internals */ +}; +.fi +.PP .B Biobuf* Bopen(char *file, int mode) .PP