sahlberg / fuse-nfs

A FUSE module for NFSv3/4
GNU General Public License v3.0
172 stars 41 forks source link

Use fuse_opt_parse instead of getopt & change usage #33

Open Daniel-Abrecht opened 5 years ago

Daniel-Abrecht commented 5 years ago

This pull request changes how options are parsed and the options available.

This way, fuse-nfs doesn't need to know all fuse options for them to be usable. This would be especially useful for options specific to the fuse implementation used (see https://github.com/Daniel-Abrecht/fuse-nfs-crossbuild-scripts/issues/2 for an example).

This also changes the usage to fuse-nfs [options] share mountpoint, which allows it to be used in /etc/fstab. (Copy it to /sbin/mount.fuse-nfs, and the fstab line could look like nfs://server/export /mnt/mountpoint fuse-nfs defaults,allow_other 0 0)

The downside of this would be that the options that have to be passed to fuse-nfs change, so this kind of breaks backward compatibility.