libbio: remove breadn.c
This commit is contained in:
parent
b7b2fea16f
commit
470ea46374
2 changed files with 0 additions and 27 deletions
|
@ -1,26 +0,0 @@
|
||||||
#include <u.h>
|
|
||||||
#include <libc.h>
|
|
||||||
#include <bio.h>
|
|
||||||
|
|
||||||
long
|
|
||||||
Breadn(Biobufhdr *bp, void *data, long len)
|
|
||||||
{
|
|
||||||
char *e, *p;
|
|
||||||
int n;
|
|
||||||
|
|
||||||
p = data;
|
|
||||||
e = p + len;
|
|
||||||
if(e < p){
|
|
||||||
Berror(bp, "invalid read length");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
while(p < e){
|
|
||||||
if((n = Bread(bp, p, e - p)) <= 0){
|
|
||||||
if(n < 0 && p == data)
|
|
||||||
return -1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
p += n;
|
|
||||||
}
|
|
||||||
return p - (char*)data;
|
|
||||||
}
|
|
|
@ -17,7 +17,6 @@ OFILES=\
|
||||||
brdline.$O\
|
brdline.$O\
|
||||||
brdstr.$O\
|
brdstr.$O\
|
||||||
bread.$O\
|
bread.$O\
|
||||||
breadn.$O\
|
|
||||||
bseek.$O\
|
bseek.$O\
|
||||||
bwrite.$O\
|
bwrite.$O\
|
||||||
bvprint.$O\
|
bvprint.$O\
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue