mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-24 01:43:22 +00:00
Redefine the TTY driver interface
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
5a9a63e1a7
commit
67065835ef
@ -24,7 +24,7 @@ pub struct FramebufferConsole {
|
||||
state: SpinLock<ConsoleState, LocalIrqDisabled>,
|
||||
}
|
||||
|
||||
pub static CONSOLE_NAME: &str = "Framebuffer-Console";
|
||||
pub const CONSOLE_NAME: &str = "Framebuffer-Console";
|
||||
|
||||
pub static FRAMEBUFFER_CONSOLE: Once<Arc<FramebufferConsole>> = Once::new();
|
||||
|
||||
|
@ -12,7 +12,7 @@ use ostd::Pod;
|
||||
|
||||
use crate::transport::{ConfigManager, VirtioTransport};
|
||||
|
||||
pub static DEVICE_NAME: &str = "Virtio-Block";
|
||||
pub const DEVICE_NAME: &str = "Virtio-Block";
|
||||
|
||||
bitflags! {
|
||||
/// features for virtio block device
|
||||
|
@ -3,4 +3,4 @@
|
||||
pub mod config;
|
||||
pub mod device;
|
||||
|
||||
pub static DEVICE_NAME: &str = "Virtio-Console";
|
||||
pub const DEVICE_NAME: &str = "Virtio-Console";
|
||||
|
@ -32,7 +32,7 @@ use ostd::{io::IoMem, Pod};
|
||||
|
||||
use crate::transport::VirtioTransport;
|
||||
|
||||
pub static DEVICE_NAME: &str = "Virtio-Input";
|
||||
pub const DEVICE_NAME: &str = "Virtio-Input";
|
||||
|
||||
/// Select value used for [`device::InputDevice::query_config_select()`].
|
||||
#[repr(u8)]
|
||||
|
@ -4,4 +4,4 @@ pub mod config;
|
||||
pub mod device;
|
||||
pub mod header;
|
||||
|
||||
pub static DEVICE_NAME: &str = "Virtio-Net";
|
||||
pub const DEVICE_NAME: &str = "Virtio-Net";
|
||||
|
@ -14,7 +14,8 @@ pub mod device;
|
||||
pub mod error;
|
||||
pub mod header;
|
||||
|
||||
pub static DEVICE_NAME: &str = "Virtio-Vsock";
|
||||
pub const DEVICE_NAME: &str = "Virtio-Vsock";
|
||||
|
||||
pub trait VsockDeviceIrqHandler = Fn() + Send + Sync + 'static;
|
||||
|
||||
pub fn register_device(name: String, device: Arc<SpinLock<SocketDevice>>) {
|
||||
|
Reference in New Issue
Block a user