X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=os%2Fos-android.h;h=bb590e4786fe3f713ed7e1a1914963ecc9dc1276;hp=c56d6827109ad09befe8b429617e4932e82eaa70;hb=63463983ce10e9678c5ad309608630eea873b4df;hpb=af13d1e88158d3e37940648be139d7a46fe00431 diff --git a/os/os-android.h b/os/os-android.h index c56d6827..bb590e47 100644 --- a/os/os-android.h +++ b/os/os-android.h @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -273,7 +274,7 @@ static inline unsigned long long get_fs_free_size(const char *path) return ret; } -static inline int os_trim(int fd, unsigned long long start, +static inline int os_trim(struct fio_file *f, unsigned long long start, unsigned long long len) { uint64_t range[2]; @@ -281,7 +282,7 @@ static inline int os_trim(int fd, unsigned long long start, range[0] = start; range[1] = len; - if (!ioctl(fd, BLKDISCARD, range)) + if (!ioctl(f->fd, BLKDISCARD, range)) return 0; return errno;