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