libbio: remove breadn.c
parent
b7b2fea16f
commit
470ea46374
|
@ -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\
|
||||
brdstr.$O\
|
||||
bread.$O\
|
||||
breadn.$O\
|
||||
bseek.$O\
|
||||
bwrite.$O\
|
||||
bvprint.$O\
|
||||
|
|
Loading…
Reference in New Issue