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

Patch for android compilation #2

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open

Conversation

edelangh
Copy link

No description provided.

Copy link
Owner

@roblabla roblabla left a comment

Choose a reason for hiding this comment

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

Des nitpicks. On arrive a une version upstreamable petit a petit ^^'

@@ -26,6 +27,8 @@ pub struct Channel {
fd: c_int,
}

use fuse::fuse_mount_compat25;
Copy link
Owner

Choose a reason for hiding this comment

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

remet le la ou il etait

@@ -526,3 +517,221 @@ pub struct fuse_dirent {
pub typ: u32,
// followed by name of namelen bytes
}

#[cfg(feature="rust-mount")]
Copy link
Owner

Choose a reason for hiding this comment

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

tous les #[cfg] la ils sont un peu lourd, faudrait utiliser cfg-if


use std;

mod sys {
Copy link
Owner

Choose a reason for hiding this comment

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

mets le cfg(not) sur le mod plutot que sur tous les enfants.

mount(c_sources.as_ptr(), c_mnt.as_ptr(), c_fs.as_ptr(), flags, c_opts.as_ptr() as *mut c_void)
};
if res < 0 {
return res;
Copy link
Owner

Choose a reason for hiding this comment

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

Ce serait pas mal de renvoyer un Result<RawFd, i32> plutot, et du coup de renvoyer errno ici plutot. Ca permettrais de rendre le code plus rusty.

}

// /usr/include/sys/mount.h
const MS_NOSUID :u64 = 2;
Copy link
Owner

Choose a reason for hiding this comment

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

Vire-moi ca, c'est defini dans la crate libc.

// TODO: check if help
// TODO: get kernel/other flags options

let mut res = fuse_mount_sys(mountpoint, flags, &mnt_opts);
Copy link
Owner

Choose a reason for hiding this comment

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

parreil, ce serait pas mal de renvoyer Result<i32, ??>

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.

4 participants