Lines Matching refs:index
181 pub fn tty_line_name(&self, index: usize) -> String { in tty_line_name()
188 return format!("{}{}", self.name, index + self.name_base); in tty_line_name()
193 self.ttys.lock().insert(tty_core.core().index(), tty_core); in add_tty()
203 pub fn device_number(&self, index: usize) -> Option<DeviceNumber> { in device_number()
204 if index >= self.device_count as usize { in device_number()
209 self.minor_start + index as u32, in device_number()
257 fn lookup_tty(&self, index: usize) -> Option<Arc<TtyCore>> { in lookup_tty()
260 .lookup(index, TtyDriverPrivateData::Unused); in lookup_tty()
263 return device_guard.get(&index).cloned(); in lookup_tty()
275 self.ttys.lock().insert(tty.index(), tty_core); in standard_install()
301 pub fn init_tty_device(&self, index: Option<usize>) -> Result<Arc<TtyCore>, SystemError> { in init_tty_device()
304 if let Some(i) = index { in init_tty_device()
321 ports[core.index()].setup_internal_tty(Arc::downgrade(&tty)); in init_tty_device()
322 tty.set_port(ports[core.index()].clone()); in init_tty_device()
341 pub fn open_tty(&self, index: Option<usize>) -> Result<Arc<TtyCore>, SystemError> { in open_tty()
344 if index.is_some() { in open_tty()
345 if let Some(t) = self.lookup_tty(index.unwrap()) { in open_tty()
357 tty = Some(self.init_tty_device(index)?); in open_tty()