Home
last modified time | relevance | path

Searched refs:dev_num (Results 1 – 2 of 2) sorted by relevance

/DragonOS/kernel/src/driver/tty/
H A Dtty_driver.rs55 pub fn lookup_tty_driver(dev_num: DeviceNumber) -> Option<(usize, Arc<TtyDriver>)> { in lookup_tty_driver()
59 if dev_num < base || dev_num.data() > base.data() + driver.device_count { in lookup_tty_driver()
62 return Some(((dev_num.data() - base.data()) as usize, driver.clone())); in lookup_tty_driver()
72 let dev_num = CharDevOps::alloc_chardev_region( in tty_register_driver() localVariable
77 driver.major = dev_num.major(); in tty_register_driver()
78 driver.minor_start = dev_num.minor(); in tty_register_driver()
80 let dev_num = DeviceNumber::new(driver.major, driver.minor_start); in tty_register_driver() localVariable
81 CharDevOps::register_chardev_region(dev_num, driver.device_count, driver.name)?; in tty_register_driver()
H A Dtty_device.rs111 let dev_num = id_table.device_number(); in new() localVariable
121 dev.inner.write().metadata.raw_dev = dev_num; in new()
147 let dev_num = self.metadata()?.raw_dev; in open() localVariable
150 TtyDriverManager::lookup_tty_driver(dev_num).ok_or(SystemError::ENODEV)?; in open()
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()