[Bug 229107] linprocfs: implement /dev/tty/drivers
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Jun 18 13:06:29 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229107
Bug ID: 229107
Summary: linprocfs: implement /dev/tty/drivers
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: bugs at FreeBSD.org
Reporter: emaste at freebsd.org
On Gentoo "Linux (none) 4.14.33-v8-0a76b56e61cf+ #1 SMP PREEMPT Wed Apr 11
11:36:25 BST 2018 aarch64 GNU/Linux" on RPi 3B+ /proc/tty/drivers contains:
/dev/tty /dev/tty 5 0 system:/dev/tty
/dev/console /dev/console 5 1 system:console
/dev/ptmx /dev/ptmx 5 2 system
/dev/vc/0 /dev/vc/0 4 0 system:vtmaster
ttyAMA /dev/ttyAMA 204 64-77 serial
ttyprintk /dev/ttyprintk 5 3 console
pty_slave /dev/pts 136 0-1048575 pty:slave
pty_master /dev/ptm 128 0-1048575 pty:master
unknown /dev/tty 4 1-63 console
This seems to be accessed by some common startup code - e.g., invoking bin/ps
reads from /proc/tty/drivers.
strace on Linus shows:
openat(AT_FDCWD, "/proc/tty/drivers", O_RDONLY) = 6
read(6, "/dev/tty /dev/tty "..., 9999) = 521
close(6) = 0
newfstatat(AT_FDCWD, "/dev/pts0", 0x7ff7270018, 0) = -1 ENOENT (No such file or
directory)
newfstatat(AT_FDCWD, "/dev/pts/0", {st_mode=S_IFCHR|0620, st_rdev=makedev(136,
0), ...}, 0) = 0
openat(AT_FDCWD, "/usr/lib64/gconv/gconv-modules.cache", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=26244, ...}) = 0
mmap(NULL, 26244, PROT_READ, MAP_SHARED, 6, 0) = 0x7f90e6a000
close(6) = 0
newfstatat(AT_FDCWD, "/proc/946", {st_mode=S_IFDIR|0555, st_size=0, ...}, 0) =
0
openat(AT_FDCWD, "/proc/946/stat", O_RDONLY) = 6
read(6, "946 (kworker/3:2) I 2 0 0 0 -1 6"..., 1024) = 160
close(6) = 0
...
Linux bin/ps under arm64 Linuxulator:
649 ps CALL linux_openat(0xffffffffffffff9c,0x40164a78,0,0)
649 ps NAMI "/compat/linux/proc/tty/drivers"
649 ps NAMI "/proc/tty/drivers"
649 ps RET linux_openat -1 errno -2 No such file or directory
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list