/DragonOS/kernel/src/driver/base/char/ |
H A D | mod.rs | 9 device_number::{DeviceNumber, Major}, 94 from: DeviceNumber, in register_chardev_region() argument 97 ) -> Result<DeviceNumber, SystemError> { in register_chardev_region() argument 111 ) -> Result<DeviceNumber, SystemError> { in alloc_chardev_region() argument 113 DeviceNumber::new(Major::UNNAMED_MAJOR, baseminor), in alloc_chardev_region() 125 device_number: DeviceNumber, in __register_chardev_region() argument 128 ) -> Result<DeviceNumber, SystemError> { in __register_chardev_region() argument 139 if minorct > DeviceNumber::MINOR_MASK + 1 - baseminor { in __register_chardev_region() 141 name, baseminor, baseminor + minorct - 1, 0, DeviceNumber::MINOR_MASK); in __register_chardev_region() 143 let chardev = DeviceStruct::new(DeviceNumber::new(major, baseminor), minorct, name); in __register_chardev_region() [all …]
|
/DragonOS/kernel/src/driver/base/map/ |
H A D | mod.rs | 4 device::device_number::{DeviceNumber, Major}, 45 struct KObjMap(Vec<BTreeMap<DeviceNumber, Probe>>); 61 dev_t: DeviceNumber, in kobj_map() argument 73 DeviceNumber::new(dev_t.major(), dev_t.minor() + i as u32), in kobj_map() 85 pub fn kobj_unmap(domain: Arc<LockedKObjMap>, dev_t: DeviceNumber, range: usize) { in kobj_unmap() argument 93 let rm_dev_t = &DeviceNumber::new(dev_t.major(), dev_t.minor() + i as u32); in kobj_unmap() 106 pub fn kobj_lookup(domain: Arc<LockedKObjMap>, dev_t: DeviceNumber) -> Option<Arc<dyn KObject>> { in kobj_lookup() 164 dev_t: DeviceNumber, //起始设备号 178 pub fn new(dev_t: DeviceNumber, minorct: u32, name: &'static str) -> Self { in new() argument 191 pub fn device_number(&self) -> DeviceNumber { in device_number() argument
|
/DragonOS/kernel/src/driver/base/device/ |
H A D | device_number.rs | 36 pub struct DeviceNumber { struct 40 impl DeviceNumber { impl 63 impl Default for DeviceNumber { implementation 69 impl From<u32> for DeviceNumber { implementation
|
H A D | mod.rs | 35 device_number::{DeviceNumber, Major}, 319 id: Option<DeviceNumber>, 328 pub fn new(basename: String, id: Option<DeviceNumber>) -> IdTable { in new() 344 pub fn device_number(&self) -> DeviceNumber { in device_number() argument
|
/DragonOS/kernel/src/driver/base/block/ |
H A D | block_device.rs | 5 device_number::{DeviceNumber, Major}, 550 from: DeviceNumber, in register_blockdev_region() argument 553 ) -> Result<DeviceNumber, SystemError> { in register_blockdev_region() argument 567 ) -> Result<DeviceNumber, SystemError> { in alloc_blockdev_region() argument 569 DeviceNumber::new(Major::UNNAMED_MAJOR, baseminor), in alloc_blockdev_region() 581 device_number: DeviceNumber, in __register_blockdev_region() argument 584 ) -> Result<DeviceNumber, SystemError> { in __register_blockdev_region() argument 595 if minorct > DeviceNumber::MINOR_MASK + 1 - baseminor { in __register_blockdev_region() 597 name, baseminor, baseminor + minorct - 1, 0, DeviceNumber::MINOR_MASK); in __register_blockdev_region() 599 let blockdev = DeviceStruct::new(DeviceNumber::new(major, baseminor), minorct, name); in __register_blockdev_region() [all …]
|
/DragonOS/kernel/src/filesystem/devfs/ |
H A D | null_dev.rs | 1 use crate::driver::base::device::device_number::DeviceNumber; 53 raw_dev: DeviceNumber::default(), // 这里用来作为device number in new()
|
H A D | zero_dev.rs | 1 use crate::driver::base::device::device_number::DeviceNumber; 53 raw_dev: DeviceNumber::default(), // 这里用来作为device number in new()
|
H A D | mod.rs | 13 driver::base::device::device_number::DeviceNumber, 287 raw_dev: DeviceNumber::from(data_ as u32), in new_with_parent() 378 raw_dev: DeviceNumber::from(data as u32), in do_create_with_data()
|
/DragonOS/kernel/src/driver/tty/ |
H A D | tty_driver.rs | 18 device_number::{DeviceNumber, Major}, 55 pub fn lookup_tty_driver(dev_num: DeviceNumber) -> Option<(usize, Arc<TtyDriver>)> { in lookup_tty_driver() 58 let base = DeviceNumber::new(driver.major, driver.minor_start); in lookup_tty_driver() 80 let dev_num = DeviceNumber::new(driver.major, driver.minor_start); in tty_register_driver() 203 pub fn device_number(&self, index: usize) -> Option<DeviceNumber> { in device_number() argument 207 Some(DeviceNumber::new( in device_number()
|
H A D | tty_device.rs | 16 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()
|
H A D | tty_core.rs | 14 driver::{base::device::device_number::DeviceNumber, tty::pty::ptm_driver}, 330 device_number: DeviceNumber, 361 pub fn device_number(&self) -> &DeviceNumber { in device_number() argument
|
/DragonOS/kernel/src/filesystem/devpts/ |
H A D | mod.rs | 17 device_number::{DeviceNumber, Major}, 117 raw_dev: DeviceNumber::default(), in new() 245 DeviceNumber::new(Major::UNIX98_PTY_SLAVE_MAJOR, name.parse::<u32>().unwrap()); in create_with_data()
|
/DragonOS/kernel/src/filesystem/overlayfs/ |
H A D | mod.rs | 8 use crate::driver::base::device::device_number::DeviceNumber; 21 const WHITEOUT_DEV: DeviceNumber = DeviceNumber::new(Major::UNNAMED_MAJOR, 0); // Whiteout 文件设备号 78 pseudo_dev: DeviceNumber, // 虚拟设备号 424 dev_t: crate::driver::base::device::device_number::DeviceNumber, in mknod() argument
|
/DragonOS/kernel/src/virt/kvm/ |
H A D | kvm_dev.rs | 1 use crate::driver::base::device::device_number::DeviceNumber; 71 raw_dev: DeviceNumber::default(), // 这里用来作为device number in new()
|
H A D | vcpu_dev.rs | 3 use crate::driver::base::device::device_number::DeviceNumber; 82 raw_dev: DeviceNumber::default(), // 这里用来作为device number in new()
|
H A D | vm_dev.rs | 1 use crate::driver::base::device::device_number::DeviceNumber; 80 raw_dev: DeviceNumber::default(), // 这里用来作为device number in new()
|
/DragonOS/kernel/src/driver/video/fbdev/base/ |
H A D | fbmem.rs | 19 device_number::{DeviceNumber, Major}, 247 pub fn device_number(&self) -> DeviceNumber { in device_number() argument 252 fn do_device_number(&self, inner_guard: &SpinLockGuard<'_, InnerFbDevice>) -> DeviceNumber { in do_device_number() argument 253 DeviceNumber::new(Major::FB_MAJOR, inner_guard.fb_id.data()) in do_device_number()
|
/DragonOS/kernel/src/filesystem/vfs/ |
H A D | mod.rs | 16 block::block_device::BlockDevice, char::CharDevice, device::device_number::DeviceNumber, 499 _dev_t: DeviceNumber, in mknod() argument 766 pub raw_dev: DeviceNumber, 785 raw_dev: DeviceNumber::default(), in default() 921 raw_dev: DeviceNumber::default(), in new()
|
/DragonOS/kernel/src/driver/keyboard/ |
H A D | ps2_keyboard.rs | 13 base::device::device_number::{DeviceNumber, Major}, 94 raw_dev: DeviceNumber::new(Major::INPUT_MAJOR, 0), // 这里用来作为device number in new()
|
/DragonOS/kernel/src/filesystem/ramfs/ |
H A D | mod.rs | 7 driver::base::device::device_number::DeviceNumber, 94 raw_dev: DeviceNumber::default(), in new() 340 raw_dev: DeviceNumber::from(data as u32), in create_with_data() 568 _dev_t: DeviceNumber, in mknod() argument 602 raw_dev: DeviceNumber::default(), in mknod()
|
/DragonOS/kernel/src/driver/tty/pty/ |
H A D | mod.rs | 10 device_number::{DeviceNumber, Major}, 225 Some(DeviceNumber::new(Major::TTYAUX_MAJOR, 2)), in unix98pty_init()
|
/DragonOS/kernel/src/filesystem/kernfs/ |
H A D | mod.rs | 13 driver::base::device::device_number::DeviceNumber, 101 raw_dev: DeviceNumber::default(), in create_root_inode() 532 raw_dev: DeviceNumber::default(), in inner_create()
|
/DragonOS/kernel/src/driver/serial/serial8250/ |
H A D | serial8250_pio.rs | 17 device_number::{DeviceNumber, Major}, 423 let (_, driver) = TtyDriverManager::lookup_tty_driver(DeviceNumber::new( in serial_8250_pio_register_tty_devices()
|
/DragonOS/kernel/src/driver/tty/virtual_terminal/ |
H A D | mod.rs | 15 device_number::{DeviceNumber, Major}, 473 TtyDriverManager::lookup_tty_driver(DeviceNumber::new(Major::TTY_MAJOR, 0)) in vty_late_init()
|
/DragonOS/kernel/src/filesystem/procfs/ |
H A D | mod.rs | 16 driver::base::device::device_number::DeviceNumber, 344 raw_dev: DeviceNumber::default(), in new() 632 raw_dev: DeviceNumber::from(data as u32), in create_with_data()
|