Skip to content
Snippets Groups Projects
Commit 14cbb4f4 authored by Jeremy Soller's avatar Jeremy Soller Committed by GitHub
Browse files

Merge pull request #3 from Yoric/master

Let root manipulate a fuse-mounted redoxfs vfs.
parents a5b6dcc0 0353bfc0
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,7 @@ extern crate time; ...@@ -7,6 +7,7 @@ extern crate time;
use image::Image; use image::Image;
use std::env; use std::env;
use std::ffi::OsStr;
use std::path::Path; use std::path::Path;
use time::Timespec; use time::Timespec;
use fuse::{FileType, FileAttr, Filesystem, Request, ReplyData, ReplyEntry, ReplyAttr, ReplyCreate, ReplyDirectory, ReplyEmpty, ReplyStatfs, ReplyWrite}; use fuse::{FileType, FileAttr, Filesystem, Request, ReplyData, ReplyEntry, ReplyAttr, ReplyCreate, ReplyDirectory, ReplyEmpty, ReplyStatfs, ReplyWrite};
...@@ -269,7 +270,14 @@ fn main() { ...@@ -269,7 +270,14 @@ fn main() {
if let Some(mountpoint) = env::args_os().nth(2) { if let Some(mountpoint) = env::args_os().nth(2) {
fuse::mount(RedoxFS { fuse::mount(RedoxFS {
fs: filesystem 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 { } else {
println!("redoxfs: no mount point provided"); println!("redoxfs: no mount point provided");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment