Chih-Wei Huang wrote:
Jean-Pierre André <jean-pierre.an...@wanadoo.fr> 於 2019年2月23日 週六 下午5:29寫道:
However, I'm thinking a more proper fix.

The standard prototype of ioctl() is
int ioctl(int fd, unsigned long request, ...);
But ntfs-3g defines ioctl method to be
int (*ioctl)(struct ntfs_device *dev, int request, void *argp);
(include/ntfs-3g/device.h etc)

Shouldn't the 'request' be changed to unsigned (long)?

Maybe, but ntfs-3g has to rely on the fuse definition.
The "unsigned long" interface is probably a Linux extension,
the Posix specification and "man ioctl" state "int request"
Ah! I checked "man ioctl" on Linux and
it said 'request' is "unsigned long":

http://man7.org/linux/man-pages/man2/ioctl.2.html

Ok, it has been changed, it is still an int on centos7.

I'm not aware of the Posix specification. Sorry!

Actually, Linux has deviated from the original ioctl()
which targeted a STREAMS (not implemented in Linux).

I have forwarded the issue to the fuse project, see
https://github.com/libfuse/libfuse/issues/367

I have also prepared a patch to define the ioctl command
as an unsigned long in ntfs-3g, but, until this is fixed in
fuse, a workaround is still needed.

Jean-Pierre



_______________________________________________
ntfs-3g-devel mailing list
ntfs-3g-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel

Reply via email to