Commit 51b46e1
committed
fs/devices: add PTY subsystem, separate stdio nodes, nonblocking stdin, and device status flags
Add full pseudo-terminal (PTY) support with PtyManager, PtyPair shared
state, master/slave ring buffers, and line discipline processing (ICRNL,
ECHO, ONLCR). PTY operations (get/set termios, foreground pgrp) are
inherent methods on devices::FileSystem rather than trait methods, since
they are too device-specific for the generic FileSystem trait.
Other changes:
- Separate NodeInfo constants for stdin/stdout/stderr (distinct ino)
- Add /dev/tty (controlling terminal) routing reads to stdin, writes to stdout
- Nonblocking stdin support via platform read_from_stdin_nonblocking
- StdinPollable, PtyMasterPollable, PtySlavePollable for epoll/poll/select
- DeviceStatusFlags for per-entry O_NONBLOCK tracking
- Manual FdEnabledSubsystemEntry with on_dup/on_close for PTY refcounting
- Implement *_at stubs (NotADirectory), fd_path, rename, set_open_status_flags
- /dev and /dev/pts directory stat support
- Proper error returns instead of unimplemented!() in open() and read()
- Zero-length read/write guards for PTY paths1 parent 4722328 commit 51b46e1
1 file changed
Lines changed: 872 additions & 86 deletions
0 commit comments