mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-08 21:06:48 +00:00
Remove as_device
from FileLike
This commit is contained in:
parent
16862a2024
commit
a7741a8a75
@ -5,10 +5,7 @@
|
||||
//! Opened File Handle
|
||||
|
||||
use crate::{
|
||||
fs::{
|
||||
device::Device,
|
||||
utils::{AccessMode, FallocMode, InodeMode, IoctlCmd, Metadata, SeekFrom, StatusFlags},
|
||||
},
|
||||
fs::utils::{AccessMode, FallocMode, InodeMode, IoctlCmd, Metadata, SeekFrom, StatusFlags},
|
||||
net::socket::Socket,
|
||||
prelude::*,
|
||||
process::{signal::Pollable, Gid, Uid},
|
||||
@ -103,10 +100,6 @@ pub trait FileLike: Pollable + Send + Sync + Any {
|
||||
fn as_socket(self: Arc<Self>) -> Option<Arc<dyn Socket>> {
|
||||
None
|
||||
}
|
||||
|
||||
fn as_device(&self) -> Option<Arc<dyn Device>> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
impl dyn FileLike {
|
||||
|
@ -134,8 +134,4 @@ impl FileLike for InodeHandle<Rights> {
|
||||
}
|
||||
self.0.fallocate(mode, offset, len)
|
||||
}
|
||||
|
||||
fn as_device(&self) -> Option<Arc<dyn Device>> {
|
||||
self.dentry().inode().as_device()
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,6 @@ use inherit_methods_macro::inherit_methods;
|
||||
use crate::{
|
||||
events::IoEvents,
|
||||
fs::{
|
||||
device::Device,
|
||||
file_handle::FileLike,
|
||||
path::Dentry,
|
||||
utils::{
|
||||
|
Loading…
x
Reference in New Issue
Block a user