Merge pull request #3 from Yoric/master

Let root manipulate a fuse-mounted redoxfs vfs.
This commit is contained in:
Jeremy Soller
2016-11-01 14:29:30 -06:00
committed by GitHub
+9 -1
View File
@@ -7,6 +7,7 @@ extern crate time;
use image::Image;
use std::env;
use std::ffi::OsStr;
use std::path::Path;
use time::Timespec;
use fuse::{FileType, FileAttr, Filesystem, Request, ReplyData, ReplyEntry, ReplyAttr, ReplyCreate, ReplyDirectory, ReplyEmpty, ReplyStatfs, ReplyWrite};
@@ -269,7 +270,14 @@ fn main() {
if let Some(mountpoint) = env::args_os().nth(2) {
fuse::mount(RedoxFS {
fs: filesystem
}, &mountpoint, &[]);
}, &mountpoint, &[
// One of the uses of this redoxfs fuse wrapper is to populate a filesystem
// while building the Redox OS kernel. This means that we need to write on
// a filesystem that belongs to `root`, which in turn means that we need to
// be `root`, thus that we need to allow `root` to have access.
OsStr::new("-o"),
OsStr::new("allow_root"),
]);
} else {
println!("redoxfs: no mount point provided");
}