add iob_addfile_close (iob_reset will close the files)
parent
6ad2022cad
commit
3996ade63e
@ -0,0 +1,15 @@
|
|||||||
|
#include "iob_internal.h"
|
||||||
|
|
||||||
|
int iob_addfile_close(io_batch* b,int64 fd,uint64 off,uint64 n) {
|
||||||
|
iob_entry* e=array_allocate(&b->b,sizeof(iob_entry),
|
||||||
|
array_length(&b->b,sizeof(iob_entry)));
|
||||||
|
if (!e) return 0;
|
||||||
|
e->type=FROMFILE_CLOSE;
|
||||||
|
e->fd=fd;
|
||||||
|
e->buf=0;
|
||||||
|
e->n=n;
|
||||||
|
e->offset=off;
|
||||||
|
b->bytesleft+=n;
|
||||||
|
++b->files;
|
||||||
|
return 1;
|
||||||
|
}
|
Loading…
Reference in New Issue