Rename systree to aster-systree

This commit is contained in:
Ruihan Li 2025-04-30 20:59:53 +08:00 committed by Tate, Hongliang Tian
parent f720c05706
commit 54bd64269b
10 changed files with 28 additions and 28 deletions

24
Cargo.lock generated
View File

@ -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"

View File

@ -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]

View File

@ -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"

View File

@ -1,5 +1,5 @@
[package]
name = "systree"
name = "aster-systree"
version = "0.1.0"
edition = "2021"

View File

@ -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

View File

@ -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),

View File

@ -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,

View File

@ -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,

View File

@ -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());

View File

@ -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::{