off_t (*lseek)(struct erofs_vfile *vf, u64 offset, int whence);
int (*fstat)(struct erofs_vfile *vf, struct stat *buf);
int (*xcopy)(struct erofs_vfile *vout, off_t pos,
- struct erofs_vfile *vin, int len, bool noseek);
+ struct erofs_vfile *vin, unsigned int len, bool noseek);
};
/* don't extend this; instead, use payload for any extra information */
ssize_t erofs_copy_file_range(int fd_in, u64 *off_in, int fd_out, u64 *off_out,
size_t length);
int erofs_io_xcopy(struct erofs_vfile *vout, off_t pos,
- struct erofs_vfile *vin, int len, bool noseek);
+ struct erofs_vfile *vin, unsigned int len, bool noseek);
#ifdef __cplusplus
}
}
int erofs_io_xcopy(struct erofs_vfile *vout, off_t pos,
- struct erofs_vfile *vin, int len, bool noseek)
+ struct erofs_vfile *vin, unsigned int len, bool noseek)
{
if (vout->ops)
return vout->ops->xcopy(vout, pos, vin, len, noseek);
do {
char buf[32768];
- int ret = min_t(int, len, sizeof(buf));
+ int ret = min_t(unsigned int, len, sizeof(buf));
ret = erofs_io_read(vin, buf, ret);
if (ret < 0)