mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-24 09:53:24 +00:00
Move some syscall specific structs from fs to syscall module
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
6cea03b871
commit
a2acf56765
@ -45,28 +45,3 @@ impl EpollEvent {
|
||||
Self { events, user_data }
|
||||
}
|
||||
}
|
||||
|
||||
impl From<&c_epoll_event> for EpollEvent {
|
||||
fn from(c_event: &c_epoll_event) -> Self {
|
||||
Self {
|
||||
events: IoEvents::from_bits_truncate(c_event.events as u32),
|
||||
user_data: c_event.data,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<&EpollEvent> for c_epoll_event {
|
||||
fn from(ep_event: &EpollEvent) -> Self {
|
||||
Self {
|
||||
events: ep_event.events.bits() as u32,
|
||||
data: ep_event.user_data,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, Pod)]
|
||||
#[repr(C)]
|
||||
pub struct c_epoll_event {
|
||||
pub events: u32,
|
||||
pub data: u64,
|
||||
}
|
||||
|
@ -1,11 +0,0 @@
|
||||
use crate::prelude::*;
|
||||
|
||||
#[repr(i32)]
|
||||
#[derive(Debug, Clone, Copy, TryFromInt)]
|
||||
#[allow(non_camel_case_types)]
|
||||
pub enum FcntlCmd {
|
||||
F_DUPFD = 0,
|
||||
F_GETFD = 1,
|
||||
F_SETFD = 2,
|
||||
F_DUPFD_CLOEXEC = 1030,
|
||||
}
|
@ -6,7 +6,6 @@ pub use creation_flags::CreationFlags;
|
||||
pub use dentry_cache::Dentry;
|
||||
pub use dirent_visitor::DirentVisitor;
|
||||
pub use direntry_vec::DirEntryVecExt;
|
||||
pub use fcntl::FcntlCmd;
|
||||
pub use file_creation_mask::FileCreationMask;
|
||||
pub use fs::{FileSystem, FsFlags, SuperBlock};
|
||||
pub use inode::{Inode, InodeMode, InodeType, Metadata};
|
||||
@ -23,7 +22,6 @@ mod creation_flags;
|
||||
mod dentry_cache;
|
||||
mod dirent_visitor;
|
||||
mod direntry_vec;
|
||||
mod fcntl;
|
||||
mod file_creation_mask;
|
||||
mod fs;
|
||||
mod inode;
|
||||
|
Reference in New Issue
Block a user