Let root manipulate a fuse-mounted redoxfs vfs.

This (along with a few Makefile changes) solves my issues building on macOS.
This commit is contained in:
David Teller
2016-11-01 21:15:25 +01:00
committed by David Teller
parent b7608c1530
commit 0353bfc00c
+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};
@@ -289,7 +290,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");
}