Home
last modified time | relevance | path

Searched refs:DeviceNumber (Results 1 – 25 of 31) sorted by relevance

12

/DragonOS/kernel/src/driver/base/char/
H A Dmod.rs9 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 Dmod.rs4 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 Ddevice_number.rs36 pub struct DeviceNumber { struct
40 impl DeviceNumber { impl
63 impl Default for DeviceNumber { implementation
69 impl From<u32> for DeviceNumber { implementation
H A Dmod.rs35 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 Dblock_device.rs5 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 Dnull_dev.rs1 use crate::driver::base::device::device_number::DeviceNumber;
53 raw_dev: DeviceNumber::default(), // 这里用来作为device number in new()
H A Dzero_dev.rs1 use crate::driver::base::device::device_number::DeviceNumber;
53 raw_dev: DeviceNumber::default(), // 这里用来作为device number in new()
H A Dmod.rs13 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 Dtty_driver.rs18 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 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()
H A Dtty_core.rs14 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 Dmod.rs17 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 Dmod.rs8 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 Dkvm_dev.rs1 use crate::driver::base::device::device_number::DeviceNumber;
71 raw_dev: DeviceNumber::default(), // 这里用来作为device number in new()
H A Dvcpu_dev.rs3 use crate::driver::base::device::device_number::DeviceNumber;
82 raw_dev: DeviceNumber::default(), // 这里用来作为device number in new()
H A Dvm_dev.rs1 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 Dfbmem.rs19 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 Dmod.rs16 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 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/filesystem/ramfs/
H A Dmod.rs7 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 Dmod.rs10 device_number::{DeviceNumber, Major},
225 Some(DeviceNumber::new(Major::TTYAUX_MAJOR, 2)), in unix98pty_init()
/DragonOS/kernel/src/filesystem/kernfs/
H A Dmod.rs13 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 Dserial8250_pio.rs17 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 Dmod.rs15 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 Dmod.rs16 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()

12