mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-08 04:55:03 +00:00
Rename systree
to aster-systree
This commit is contained in:
parent
f720c05706
commit
54bd64269b
24
Cargo.lock
generated
24
Cargo.lock
generated
@ -193,6 +193,7 @@ dependencies = [
|
||||
"aster-rights",
|
||||
"aster-rights-proc",
|
||||
"aster-softirq",
|
||||
"aster-systree",
|
||||
"aster-time",
|
||||
"aster-util",
|
||||
"aster-virtio",
|
||||
@ -223,7 +224,6 @@ dependencies = [
|
||||
"rand",
|
||||
"riscv",
|
||||
"spin",
|
||||
"systree",
|
||||
"takeable",
|
||||
"tdx-guest",
|
||||
"time",
|
||||
@ -262,6 +262,16 @@ dependencies = [
|
||||
"spin",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aster-systree"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bitflags 2.6.0",
|
||||
"component",
|
||||
"ostd",
|
||||
"spin",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aster-time"
|
||||
version = "0.1.0"
|
||||
@ -296,6 +306,7 @@ dependencies = [
|
||||
"aster-network",
|
||||
"aster-rights",
|
||||
"aster-softirq",
|
||||
"aster-systree",
|
||||
"aster-util",
|
||||
"bitflags 1.3.2",
|
||||
"component",
|
||||
@ -304,7 +315,6 @@ dependencies = [
|
||||
"log",
|
||||
"ostd",
|
||||
"spin",
|
||||
"systree",
|
||||
"typeflags-util",
|
||||
]
|
||||
|
||||
@ -1687,16 +1697,6 @@ dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "systree"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bitflags 2.6.0",
|
||||
"component",
|
||||
"ostd",
|
||||
"spin",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "takeable"
|
||||
version = "0.2.2"
|
||||
|
@ -11,7 +11,7 @@ time = { name = "aster-time" }
|
||||
framebuffer = { name = "aster-framebuffer" }
|
||||
network = { name = "aster-network" }
|
||||
mlsdisk = { name = "aster-mlsdisk" }
|
||||
systree = { name = "systree" }
|
||||
systree = { name = "aster-systree" }
|
||||
|
||||
[whitelist]
|
||||
[whitelist.nix.main]
|
||||
|
@ -18,6 +18,7 @@ aster-mlsdisk = { path = "comps/mlsdisk" }
|
||||
aster-time = { path = "comps/time" }
|
||||
aster-virtio = { path = "comps/virtio" }
|
||||
aster-rights = { path = "libs/aster-rights" }
|
||||
aster-systree = { path = "comps/systree" }
|
||||
component = { path = "libs/comp-sys/component" }
|
||||
controlled = { path = "libs/comp-sys/controlled" }
|
||||
osdk-frame-allocator = { path = "../osdk/deps/frame-allocator" }
|
||||
@ -59,7 +60,6 @@ inherit-methods-macro = { git = "https://github.com/asterinas/inherit-methods-ma
|
||||
getset = "0.1.2"
|
||||
takeable = "0.2.2"
|
||||
cfg-if = "1.0"
|
||||
systree = { path = "comps/systree" }
|
||||
# Fixed point numbers
|
||||
# TODO: fork this crate to rewrite all the (unnecessary) unsafe usage
|
||||
fixed = "1.28.0"
|
||||
|
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "systree"
|
||||
name = "aster-systree"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
|
@ -16,13 +16,13 @@ aster-util = { path = "../../libs/aster-util" }
|
||||
aster-rights = { path = "../../libs/aster-rights" }
|
||||
aster-bigtcp = { path = "../../libs/aster-bigtcp" }
|
||||
aster-softirq = { path = "../softirq"}
|
||||
aster-systree = { path = "../systree" }
|
||||
id-alloc = { path = "../../../ostd/libs/id-alloc" }
|
||||
typeflags-util = { path = "../../libs/typeflags-util" }
|
||||
ostd = { path = "../../../ostd" }
|
||||
component = { path = "../../libs/comp-sys/component" }
|
||||
log = "0.4"
|
||||
int-to-c-enum = { path = "../../libs/int-to-c-enum" }
|
||||
systree = { path = "../systree" }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
@ -330,9 +330,9 @@ impl From<int_to_c_enum::TryFromIntError> for Error {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<systree::Error> for Error {
|
||||
fn from(err: systree::Error) -> Self {
|
||||
use systree::Error::*;
|
||||
impl From<aster_systree::Error> for Error {
|
||||
fn from(err: aster_systree::Error) -> Self {
|
||||
use aster_systree::Error::*;
|
||||
match err {
|
||||
NodeNotFound(_) => Error::new(Errno::ENOENT),
|
||||
InvalidNodeOperation(_) => Error::new(Errno::EINVAL),
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
use alloc::sync::Arc;
|
||||
|
||||
use systree::singleton as systree_singleton;
|
||||
use aster_systree::singleton as systree_singleton;
|
||||
|
||||
use crate::fs::{
|
||||
sysfs::inode::SysFsInode,
|
||||
|
@ -8,11 +8,11 @@ use alloc::{
|
||||
};
|
||||
use core::time::Duration;
|
||||
|
||||
use ostd::sync::RwLock;
|
||||
use systree::{
|
||||
use aster_systree::{
|
||||
SysAttr, SysAttrFlags, SysBranchNode, SysNode, SysNodeId, SysNodeType, SysObj, SysStr,
|
||||
SysSymlink, SysTree,
|
||||
};
|
||||
use ostd::sync::RwLock;
|
||||
|
||||
use crate::{
|
||||
events::IoEvents,
|
||||
|
@ -20,7 +20,7 @@ pub fn singleton() -> &'static Arc<SysFs> {
|
||||
|
||||
/// Initializes the SysFs singleton.
|
||||
/// Ensures that the singleton is created by calling it.
|
||||
/// Should be called during kernel filesystem initialization, *after* systree::init().
|
||||
/// Should be called during kernel filesystem initialization, *after* aster_systree::init().
|
||||
pub fn init() {
|
||||
// Ensure systree is initialized first. This should be handled by the kernel's init order.
|
||||
SYSFS_SINGLETON.call_once(|| SysFs::new());
|
||||
|
@ -11,16 +11,16 @@ use alloc::{
|
||||
};
|
||||
use core::{any::Any, fmt::Debug};
|
||||
|
||||
use aster_systree::{
|
||||
init_for_ktest, singleton as systree_singleton, Error as SysTreeError, Result as SysTreeResult,
|
||||
SysAttrFlags, SysAttrSet, SysAttrSetBuilder, SysBranchNode, SysBranchNodeFields, SysNode,
|
||||
SysNodeId, SysNodeType, SysNormalNodeFields, SysObj, SysStr, SysSymlink, SysTree,
|
||||
};
|
||||
use ostd::{
|
||||
mm::{FallibleVmRead, FallibleVmWrite, VmReader, VmWriter},
|
||||
prelude::ktest,
|
||||
sync::RwLock,
|
||||
};
|
||||
use systree::{
|
||||
init_for_ktest, singleton as systree_singleton, Error as SysTreeError, Result as SysTreeResult,
|
||||
SysAttrFlags, SysAttrSet, SysAttrSetBuilder, SysBranchNode, SysBranchNodeFields, SysNode,
|
||||
SysNodeId, SysNodeType, SysNormalNodeFields, SysObj, SysStr, SysSymlink, SysTree,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
fs::{
|
||||
|
Loading…
x
Reference in New Issue
Block a user