Home
last modified time | relevance | path

Searched refs:Major (Results 1 – 15 of 15) sorted by relevance

/DragonOS/kernel/src/driver/base/device/
H A Ddevice_number.rs2 pub struct Major(u32); struct
4 impl Major { implementation
28 Major(x) in new()
44 pub const fn new(major: Major, minor: u32) -> Self { in new() argument
50 pub const fn major(&self) -> Major { in major() argument
51 Major::new(self.data >> Self::MINOR_BITS) in major()
65 Self::new(Major::UNNAMED_MAJOR, 0) in default()
H A Dmod.rs35 device_number::{DeviceNumber, Major},
534 if device.id_table().device_number().major() != Major::UNNAMED_MAJOR { in add_device()
/DragonOS/kernel/src/driver/base/map/
H A Dmod.rs4 device::device_number::{DeviceNumber, Major},
12 pub(crate) const DEV_MAJOR_MAX: Major = Major::new(512);
15 pub(crate) const DEV_MAJOR_DYN_END: Major = Major::new(234);
17 pub(crate) const DEV_MAJOR_DYN_EXT_START: Major = Major::new(511);
18 pub(crate) const DEV_MAJOR_DYN_EXT_END: Major = Major::new(384);
/DragonOS/kernel/src/driver/base/char/
H A Dmod.rs9 device_number::{DeviceNumber, Major},
48 fn major_to_index(major: Major) -> usize { in major_to_index()
56 fn find_dynamic_major() -> Result<Major, SystemError> { in find_dynamic_major()
62 return Ok(Major::new(index)); // 返回可用的主设备号 in find_dynamic_major()
70 if let Some(chardevss) = chardevs.get(Self::major_to_index(Major::new(index))) { in find_dynamic_major()
80 return Ok(Major::new(index)); // 返回可用的主设备号 in find_dynamic_major()
113 DeviceNumber::new(Major::UNNAMED_MAJOR, baseminor), in alloc_chardev_region()
144 if major == Major::UNNAMED_MAJOR { in __register_chardev_region()
/DragonOS/kernel/src/driver/base/block/
H A Dblock_device.rs5 device_number::{DeviceNumber, Major},
504 fn major_to_index(major: Major) -> usize { in major_to_index()
512 fn find_dynamic_major() -> Result<Major, SystemError> { in find_dynamic_major()
518 return Ok(Major::new(index)); // 返回可用的主设备号 in find_dynamic_major()
526 if let Some(blockdevss) = blockdevs.get(Self::major_to_index(Major::new(index))) { in find_dynamic_major()
529 if item.device_number().major() == Major::new(index) { in find_dynamic_major()
536 return Ok(Major::new(index)); // 返回可用的主设备号 in find_dynamic_major()
569 DeviceNumber::new(Major::UNNAMED_MAJOR, baseminor), in alloc_blockdev_region()
600 if major == Major::UNNAMED_MAJOR { in __register_blockdev_region()
/DragonOS/kernel/src/driver/tty/pty/
H A Dmod.rs10 device_number::{DeviceNumber, Major},
225 Some(DeviceNumber::new(Major::TTYAUX_MAJOR, 2)), in unix98pty_init()
251 Major::UNIX98_PTY_MASTER_MAJOR, in pty_init()
272 Major::UNIX98_PTY_SLAVE_MAJOR, in pty_init()
/DragonOS/kernel/src/driver/keyboard/
H A Dps2_keyboard.rs13 base::device::device_number::{DeviceNumber, Major},
94 raw_dev: DeviceNumber::new(Major::INPUT_MAJOR, 0), // 这里用来作为device number in new()
/DragonOS/kernel/src/driver/tty/
H A Dtty_driver.rs18 device_number::{DeviceNumber, Major},
71 if driver.major == Major::UNNAMED_MAJOR { in tty_register_driver()
112 major: Major,
148 major: Major, in new() argument
H A Dtty_device.rs16 device_number::{DeviceNumber, Major},
170 if !(mode.contains(FileMode::O_NOCTTY) && dev_num == DeviceNumber::new(Major::TTY_MAJOR, 0) in open()
171 || dev_num == DeviceNumber::new(Major::TTYAUX_MAJOR, 1) in open()
603 Some(DeviceNumber::new(Major::TTYAUX_MAJOR, 1)), in tty_init()
/DragonOS/kernel/src/filesystem/devpts/
H A Dmod.rs17 device_number::{DeviceNumber, Major},
245 DeviceNumber::new(Major::UNIX98_PTY_SLAVE_MAJOR, name.parse::<u32>().unwrap()); in create_with_data()
/DragonOS/kernel/src/driver/tty/virtual_terminal/
H A Dmod.rs15 device_number::{DeviceNumber, Major},
454 Major::TTY_MAJOR, in vty_init()
473 TtyDriverManager::lookup_tty_driver(DeviceNumber::new(Major::TTY_MAJOR, 0)) in vty_late_init()
/DragonOS/kernel/src/driver/video/fbdev/base/
H A Dfbmem.rs19 device_number::{DeviceNumber, Major},
253 DeviceNumber::new(Major::FB_MAJOR, inner_guard.fb_id.data()) in do_device_number()
/DragonOS/kernel/src/driver/serial/serial8250/
H A Dserial8250_pio.rs17 device_number::{DeviceNumber, Major},
424 Major::TTY_MAJOR, in serial_8250_pio_register_tty_devices()
H A Dmod.rs19 bus::Bus, device_manager, device_number::Major, driver::Driver, Device,
141 Major::TTY_MAJOR, in serial_tty_init()
/DragonOS/kernel/src/filesystem/overlayfs/
H A Dmod.rs9 use crate::driver::base::device::device_number::Major;
21 const WHITEOUT_DEV: DeviceNumber = DeviceNumber::new(Major::UNNAMED_MAJOR, 0); // Whiteout 文件设备号