diff options
author | aiju <devnull@localhost> | 2017-05-04 17:42:12 +0000 |
---|---|---|
committer | aiju <devnull@localhost> | 2017-05-04 17:42:12 +0000 |
commit | f681cf835af1e5c9e016e5245c24165b029a5e38 (patch) | |
tree | 43453c10a803a5e64b47dc3474e603715cd76bcc /sys/include | |
parent | 414d29e98f8d5242cc68161e61b66b7171e96634 (diff) |
bio: add support for custom I/O handler via Biofn
Diffstat (limited to 'sys/include')
-rw-r--r-- | sys/include/bio.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/include/bio.h b/sys/include/bio.h index 157e525c4..2a874de31 100644 --- a/sys/include/bio.h +++ b/sys/include/bio.h @@ -33,6 +33,7 @@ struct Biobufhdr uchar* ebuf; /* pointer to end of buffer */ 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 */ }; struct Biobuf @@ -74,6 +75,7 @@ int Bungetrune(Biobufhdr*); long Bwrite(Biobufhdr*, void*, long); void Blethal(Biobufhdr*, void(*)(char*)); void Berror(Biobufhdr*, char*, ...); +void Biofn(Biobufhdr*, int(*)(Biobufhdr*, void*, long)); #pragma varargck argpos Bprint 2 #pragma varargck argpos Berror 2 |