> diff --git a/lib/libf2fs_io.c b/lib/libf2fs_io.c > index 5d9b68d..46b5484 100644 > --- a/lib/libf2fs_io.c > +++ b/lib/libf2fs_io.c > @@ -28,11 +28,11 @@ struct f2fs_configuration config; > /* > * IO interfaces > */ > -int dev_read(void *buf, __u64 offset, size_t len) > +int dev_read(void *buf, __u64 offset, size_t len, int fd)
Don't add fd. This makes the wrong assumption that an FD is actually the underlying mechanism to read from the device. These IO routines are to be called without that assumption. Forcing it in the API here breaks the capability to read/write on devices that are not files. If you need to dev_read(), then setup the config appropriately. For the rationale, see commits 437dbf67730d2765c4dfc8539b07258e1ca3966f 15ea79b3ae7f0474ade43ba8b6eb328806e01e15 -- ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
