mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-28 20:03:22 +00:00
Add Debug support for some fs components
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
acfbc7efdc
commit
55267f0d81
@ -13,6 +13,7 @@ use crate::fs::utils::{
|
||||
use crate::prelude::*;
|
||||
use jinux_rights::Rights;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct InodeHandle<R = Rights>(Arc<InodeHandle_>, R);
|
||||
|
||||
struct InodeHandle_ {
|
||||
@ -119,6 +120,17 @@ impl InodeHandle_ {
|
||||
}
|
||||
}
|
||||
|
||||
impl Debug for InodeHandle_ {
|
||||
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
|
||||
f.debug_struct("InodeHandle_")
|
||||
.field("dentry", &self.dentry)
|
||||
.field("offset", &self.offset())
|
||||
.field("access_mode", &self.access_mode())
|
||||
.field("status_flags", &self.status_flags())
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
/// Methods for both dyn and static
|
||||
impl<R> InodeHandle<R> {
|
||||
pub fn dentry(&self) -> &Arc<Dentry> {
|
||||
|
Reference in New Issue
Block a user