Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
FortuneOreo opened this issue Jun 15, 2023 · 7 comments
Open

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

FortuneOreo opened this issue Jun 15, 2023 · 7 comments
Assignees

Comments

@FortuneOreo
Copy link

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!

@unsound unsound self-assigned this Jun 17, 2023
@unsound
Copy link
Member

unsound commented Jun 18, 2023

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

@FortuneOreo
Copy link
Author

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

@unsound
Copy link
Member

unsound commented Jun 19, 2023

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.

@FortuneOreo
Copy link
Author

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?

@FortuneOreo
Copy link
Author

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!

@unsound
Copy link
Member

unsound commented Jun 19, 2023

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/

@jlf1764
Copy link

jlf1764 commented Apr 7, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants