mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
libmach: fix warning about preadn
R=rsc http://codereview.appspot.com/2388041
This commit is contained in:
parent
c54202e577
commit
bb72982b79
1 changed files with 0 additions and 21 deletions
|
@ -6,27 +6,6 @@
|
|||
/*
|
||||
http://www.channelu.com/NeXT/NeXTStep/3.3/nd/DevTools/14_MachO/MachO.htmld/
|
||||
*/
|
||||
static long
|
||||
preadn(int fd, void *vdata, uint32 ulen, uint64 offset)
|
||||
{
|
||||
long n;
|
||||
uchar *data;
|
||||
long len;
|
||||
|
||||
len = ulen;
|
||||
data = vdata;
|
||||
/* fprint(2, "readn 0x%llux 0x%ux\n", offset, ulen); */
|
||||
while(len > 0){
|
||||
n = pread(fd, data, len, offset);
|
||||
if(n <= 0)
|
||||
break;
|
||||
data += n;
|
||||
offset += n;
|
||||
len -= n;
|
||||
}
|
||||
return data-(uchar*)vdata;
|
||||
}
|
||||
|
||||
|
||||
Macho*
|
||||
machoopen(char *name)
|
||||
|
|
Loading…
Reference in a new issue