relan / exfat

Free exFAT file system implementation
GNU General Public License v2.0
795 stars 182 forks source link

fix command line argument order #105

Open kunkku opened 6 years ago

kunkku commented 6 years ago

The mount spec and directory are passed as the first and second arguments to the helper, followed by the options.

The current implementation works on glibc but fails on POSIX-conforming C libraries such as musl.

relan commented 6 years ago

Thanks for the patch!

You mean the POSIXLY_CORRECT case, right?

A user can call mount.exfat-fuse directly and is in full right to put device and mountpoint after other options. Your change breaks this use-case. It also breaks mount.exfat-fuse -V.

I'd suggest to mutate argv[] instead (i.e. to do what glibc does) to cover all those cases.

kunkku commented 6 years ago

Arbitrary argument order supported now.