tuxera/ntfs-3g

ntfs-3g can't support a device node named with comma?

FortuneOreo opened this issue · 7 comments

when I use ntfs-3g in Android 12, and after plug an usb flash drive(whose file system is ntfs) into my board. the vold of Android will create a device node like "/dev/block/vold/public:8,1", and when I use ntfs-3g to mount this device node, by executing "ntfs-3g /dev/block/vold/public:\8,1 /mnt". The result is "ntfs-3g-mount: mount failed: No such file or directory".

so, has anyone ever had a similar problem? And who can give me some advice?

Thanks very much!

There is a way to escape commas in libfuse 2.8 and higher, allowing you to mount block devices with a comma in them. Here's an experimental patch to support such devices:
0001-ntfs-3g_common.c-Escape-in-fsname-on-libfuse-2.8.0-a.patch

There is a way to escape commas in libfuse 2.8 and higher, allowing you to mount block devices with a comma in them. Here's an experimental patch to support such devices: 0001-ntfs-3g_common.c-Escape-in-fsname-on-libfuse-2.8.0-a.patch


the patch seems no use, another error appears

One thing that I forgot to mention: You have to build ntfs-3g against an external libfuse (configure option --with-fuse=external) for this to work because libfuse-lite doesn't support option escaping.

One thing that I forgot to mention: You have to build ntfs-3g against an external libfuse (configure option --with-fuse=external) for this to work because libfuse-lite doesn't support option escaping.

so that I shoud also build a external libfuse?

One thing that I forgot to mention: You have to build ntfs-3g against an external libfuse (configure option --with-fuse=external) for this to work because libfuse-lite doesn't support option escaping.

Excuse me, could you please tell me how to use a external libfuse rather than libfuse-lite?
I tried to download the libfuse (https://github.com/libfuse/libfuse/releases), and make a cross compile, which specified it's install dir to a custom dir like "/home/xxx/code/install".
And when I config the ntfs-3g, I use order like this: ./configure CC=arm-hi100-linux-gcc --host=arm-hi100-linux --enable-really-static --prefix=/home/xxx/code/install --with-fuse=/home/xxx/code/install CPPFLAGS="-I/home/xxx/code/install/include/fuse" LIBS="-L/home/xxx/code/install/lib/libfuse.a".
Then I execute make, but the compile was failed like this:

/home/xxx/code/ntfs-3g/ntfs-3g/src/lowntfs-3g.c:4586: undefined reference to fuse_version' /home/xxx/code/toolchain/arm-hi100-linux/bin/../lib/gcc/arm-gcc7.4-linux-gnueabihf/7.4.1/../../../../arm-gcc7.4-linux-gnueabihf/bin/ld: lowntfs_3g-lowntfs-3g.o: in function main':
/home/xxx/code/ntfs-3g/ntfs-3g/src/lowntfs-3g.c:4849: undefined reference to fuse_session_loop' /home/xxx/code/toolchain/arm-hi100-linux/bin/../lib/gcc/arm-gcc7.4-linux-gnueabihf/7.4.1/../../../../arm-gcc7.4-linux-gnueabihf/bin/ld: /home/xxx/code/ntfs-3g/ntfs-3g/src/lowntfs-3g.c:4850: undefined reference to fuse_remove_signal_handlers'
/home/xxx/code/toolchain/arm-hi100-linux/bin/../lib/gcc/arm-gcc7.4-linux-gnueabihf/7.4.1/../../../../arm-gcc7.4-linux-gnueabihf/bin/ld: /home/xxx/code/ntfs-3g/ntfs-3g/src/lowntfs-3g.c:4854: undefined reference to fuse_unmount' /home/xxx/code/toolchain/arm-hi100-linux/bin/../lib/gcc/arm-gcc7.4-linux-gnueabihf/7.4.1/../../../../arm-gcc7.4-linux-gnueabihf/bin/ld: /home/xxx/code/ntfs-3g/ntfs-3g/src/lowntfs-3g.c:4855: undefined reference to fuse_session_destroy'
/home/xxx/code/toolchain/arm-hi100-linux/bin/../lib/gcc/arm-gcc7.4-linux-gnueabihf/7.4.1/../../../../arm-gcc7.4-linux-gnueabihf/bin/ld: lowntfs_3g-ntfs-3g_common.o: in function ntfs_parse_options': /home/xxx/code/ntfs-3g/ntfs-3g/src/ntfs-3g_common.c:666: undefined reference to fuse_version'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:573: lowntfs-3g] Error 1
make[2]: Leaving directory '/home/xxx/code/ntfs-3g/ntfs-3g/src'
make[1]: *** [Makefile:505: all-recursive] Error 1
make[1]: Leaving directory '/home/xxx/code/ntfs-3g/ntfs-3g'
make: *** [Makefile:416: all] Error 2

Please give some advices,
Thanks a lot!

Sorry, I can't tell you how to build software for your own platform, it's not my area of expertise. In Ubuntu/Debian or Fedora you would just install the package libfuse-dev / fuse-devel, i.e. no need to build your own libfuse.

If you need help with integration for an embedded platform then you should maybe consider our commercial support offerings: https://www.tuxera.com/products/tuxera-ntfs-embedded/

There is a way to escape commas in libfuse 2.8 and higher, allowing you to mount block devices with a comma in them. Here's an experimental patch to support such devices: 0001-ntfs-3g_common.c-Escape-in-fsname-on-libfuse-2.8.0-a.patch

the patch seems no use, another error appears
I have the same problem as you, f you solved it,can you tell me how you solved it ? Thank you very much.