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

WIP: Update fuse mount methods to take AsRef<OsStr> as options #131

Conversation

krishna-veerareddy
Copy link

Update fuse::mount and fuse::spawn_mount to take generic AsRef
as options argument.

Fixes #117

Update fuse::mount and fuse::spawn_mount to take generic AsRef<OsStr>
as options argument.
let args = vec![
CString::new("rust-fuse").unwrap(),
CString::new(options.to_str().unwrap()).unwrap()
];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a change in behavior: the current code passes FUSE a list of N arguments; this code always gives it only 2 arguments, where everything after the first is combined into one string. This doesn't actually work correctly; if you play with the example a bit, you'll notice that everything past the first space character gets ignored by FUSE.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback. Ill mark the PR as WIP while I take a look at this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 a good way to test this is by passing --help as one of the arguments. libfuse will print its usage text if it sees that.

@krishna-veerareddy krishna-veerareddy changed the title Update fuse mount methods to take AsRef<OsStr> as options WIP: Update fuse mount methods to take AsRef<OsStr> as options Jul 11, 2019
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

Successfully merging this pull request may close these issues.

fuse::mount should take a generic AsRef<OsStr> argument
2 participants