Add termios read/write file

This commit is contained in:
Jeremy Soller
2017-07-23 10:53:24 -06:00
parent 854b6470c4
commit 36a34e70b2
6 changed files with 122 additions and 5 deletions
+4
View File
@@ -32,6 +32,10 @@ impl Resource for PtySlave {
self.pty.clone()
}
fn flags(&self) -> usize {
self.flags
}
fn path(&self, buf: &mut [u8]) -> Result<usize> {
if let Some(pty_lock) = self.pty.upgrade() {
pty_lock.borrow_mut().path(buf)