rename to 'rcore-fs' and create workspace

master
WangRunji 6 years ago
parent f7c75234de
commit f308d7bd6e

@ -2,5 +2,5 @@ language: rust
rust: rust:
- nightly - nightly
script: script:
- cargo build --bin mksfs --features "std" - cargo build
- cargo test --verbose -- --test-threads=1 - cargo test --verbose -- --test-threads=1

@ -1,18 +1,5 @@
[package] [workspace]
name = "simple-filesystem" members = [
version = "0.1.0" "rcore-fs",
authors = ["WangRunji <wangrunji0408@163.com>", "Ben Pig Chu <benpichu@gmail.com>"] "rcore-fs-fuse"
edition = "2018" ]
[[bin]]
name = "mksfs"
path = "src/bin/mksfs.rs"
required-features = ["std"]
[dependencies]
bit-vec = { default-features = false, git = "https://github.com/AltSysrq/bit-vec.git" } # default-features contains 'std'
static_assertions = "0.3"
spin = "0.4"
[features]
std = []

@ -11,4 +11,4 @@ log = "0.4"
fuse = "0.3" fuse = "0.3"
structopt = "0.2" structopt = "0.2"
env_logger = "0.3" env_logger = "0.3"
simple-filesystem = { path = "..", features = ["std"] } rcore-fs = { path = "../rcore-fs", features = ["std"] }

@ -10,7 +10,7 @@ use log::*;
use structopt::StructOpt; use structopt::StructOpt;
use time::Timespec; use time::Timespec;
use simple_filesystem::{sfs, vfs}; use rcore_fs::{sfs, vfs};
const TTL: Timespec = Timespec { sec: 1, nsec: 0 }; // 1 second const TTL: Timespec = Timespec { sec: 1, nsec: 0 }; // 1 second

@ -13,7 +13,7 @@ panic = 'abort' # prevent `_Unwind_Resume` link error
[dependencies] [dependencies]
bitflags = "1.0" bitflags = "1.0"
static_assertions = "0.3" static_assertions = "0.3"
simple-filesystem = { path = ".." } rcore-fs = { path = "../rcore-fs" }
spin = "0.4" spin = "0.4"
lazy_static = { version = "1.2", features = ["spin_no_std"] } lazy_static = { version = "1.2", features = ["spin_no_std"] }

@ -22,7 +22,7 @@ use core::alloc::{GlobalAlloc, Layout};
use core::mem; use core::mem;
use core::ops::Deref; use core::ops::Deref;
use core::slice; use core::slice;
use simple_filesystem::{sfs, vfs}; use rcore_fs::{sfs, vfs};
use spin::Mutex; use spin::Mutex;
/// Lang items for bare lib /// Lang items for bare lib

@ -0,0 +1,18 @@
[package]
name = "rcore-fs"
version = "0.1.0"
authors = ["WangRunji <wangrunji0408@163.com>", "Ben Pig Chu <benpichu@gmail.com>"]
edition = "2018"
[[bin]]
name = "mksfs"
path = "src/bin/mksfs.rs"
required-features = ["std"]
[dependencies]
bit-vec = { default-features = false, git = "https://github.com/AltSysrq/bit-vec.git" } # default-features contains 'std'
static_assertions = "0.3"
spin = "0.4"
[features]
std = []

@ -4,7 +4,7 @@ use std::io::{Read, Write, Result};
use std::path::Path; use std::path::Path;
use std::mem::uninitialized; use std::mem::uninitialized;
use std::sync::Arc; use std::sync::Arc;
use simple_filesystem::*; use rcore_fs::{sfs::SimpleFileSystem, vfs::*};
fn main() -> Result<()> { fn main() -> Result<()> {
let args: Vec<_> = env::args().collect(); let args: Vec<_> = env::args().collect();

@ -41,11 +41,17 @@ fn create_file() -> Result<()> {
let file1 = root.create("file1", FileType::File)?; let file1 = root.create("file1", FileType::File)?;
assert_eq!(file1.info()?, FileInfo { assert_eq!(file1.info()?, FileInfo {
inode: 5,
size: 0, size: 0,
type_: FileType::File, type_: FileType::File,
mode: 0, mode: 0o777,
blocks: 0, blocks: 0,
atime: Timespec { sec: 0, nsec: 0 },
mtime: Timespec { sec: 0, nsec: 0 },
nlinks: 1, nlinks: 1,
uid: 0,
ctime: Timespec { sec: 0, nsec: 0 },
gid: 0
}); });
sfs.sync()?; sfs.sync()?;
Loading…
Cancel
Save