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