genode/repos/libports/src/lib/libc
Norman Feske 7ac32ea60c libc: support for ioctls via ioctl directory
This patch introduces a new scheme of handling ioctl operations that
maps ioctls to pseudo-file accesses, similar to how the libc maps socket
calls to socket-fs operations.

A device file can be accompanied with a (hidden) directory that is named
after the device file and hosts pseudo files for triggering the various
device operations. For example, for accessing a terminal, the directory
structure looks like this:

  /dev/terminal
  /dev/.terminal/info

The 'info' file contains device information in XML format. The type of
the XML node corresponds to the device type. E.g., If the libc receives
a 'TIOCGWINSZ' ioctl for /dev/terminal, it reads the content of
/dev/.terminal/info to obtain the terminal-size information. In this
case, the 'info' file looks as follows:

  <terminal rows="25" columns="80/>

Following this scheme, VFS plugins can support ioctl operations by
providing an ioctl directory in addition to the actual device file.

Internally, the mechanism uses the 'os/vfs.h' API to access pseudo
files. Hence, we need to propagate the Vfs::Env to 'vfs_plugin.cc' to
create an instance of a 'Directory' for the root for the VFS.

Issue #3519
2019-11-19 14:39:09 +01:00
..
internal libc: support for ioctls via ioctl directory 2019-11-19 14:39:09 +01:00
patches libc: discharge use of hidden symbols 2019-07-09 08:58:38 +02:00
spec libc: split task.cc into multiple files 2019-11-19 14:10:55 +01:00
atexit.cc Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
component.cc libc: split task.cc into multiple files 2019-11-19 14:10:55 +01:00
dummies.cc Libc: implement getifaddrs 2019-09-02 16:36:07 +02:00
dynamic_linker.cc libc: split task.cc into multiple files 2019-11-19 14:10:55 +01:00
environ.cc Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
errno.cc Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
execve.cc libc: resolve symlinks in execve 2019-11-19 14:17:29 +01:00
exit.cc libports: avoid using deprecated APIs 2019-01-30 13:49:55 +01:00
fd_alloc.cc libc: unify use of namespaces 2019-11-19 14:10:55 +01:00
file_operations.cc libc: improve dup/dup2 in vfs_plugin 2019-11-19 14:10:55 +01:00
fork.cc libc: resolve symlinks in execve 2019-11-19 14:17:29 +01:00
gai_strerror.cc Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
getpwent.cc libc: reimplement passwd handling 2019-11-19 14:10:55 +01:00
getrandom.cc libc: unify use of namespaces 2019-11-19 14:10:55 +01:00
issetugid.cc libc: silence common not implemented warnings 2018-02-16 08:42:30 +01:00
kernel.cc libc: bring back old 'poll()' emulation 2019-11-19 14:23:55 +01:00
legacy.cc libc: remove global watch() function 2019-11-19 14:10:55 +01:00
libc_mem_alloc.cc libc: unify use of namespaces 2019-11-19 14:10:55 +01:00
log2.c Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
malloc.cc libc: unify use of namespaces 2019-11-19 14:10:55 +01:00
nolocale.cc Libc: update port to Freebsd 12 2019-05-27 14:46:53 +02:00
plugin_registry.cc libc: execve 2019-08-28 14:19:45 +02:00
plugin.cc libc: unify use of namespaces 2019-11-19 14:10:55 +01:00
poll.cc libc: honor poll() event flags POLLRDNORM etc. 2019-11-19 14:23:55 +01:00
pread_pwrite.cc libc: unify use of namespaces 2019-11-19 14:10:55 +01:00
progname.cc Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
pthread_create.cc libc: unify use of namespaces 2019-11-19 14:10:55 +01:00
pthread.cc libc: fix and cleanup pthread mutexes 2019-11-19 14:23:57 +01:00
readv_writev.cc libc: unify use of namespaces 2019-11-19 14:10:55 +01:00
rlimit.cc libc: rlimit add address-space size + number fds 2018-05-30 12:26:20 +02:00
rwlock.cc libc: unify use of namespaces 2019-11-19 14:10:55 +01:00
select.cc libc: unify use of namespaces 2019-11-19 14:10:55 +01:00
semaphore.cc libc: fix and cleanup pthread mutexes 2019-11-19 14:23:57 +01:00
signal.cc libc: unify use of namespaces 2019-11-19 14:10:55 +01:00
sleep.cc libc: unify use of namespaces 2019-11-19 14:10:55 +01:00
socket_fs_plugin.cc libc: unify use of namespaces 2019-11-19 14:10:55 +01:00
socket_operations.cc libc: unify use of namespaces 2019-11-19 14:10:55 +01:00
syscall.cc libc: support syscall(SYS_thr_self,...) 2018-05-30 13:36:07 +02:00
sysctl.cc libc: unify use of namespaces 2019-11-19 14:10:55 +01:00
time.cc libc: remove global watch() function 2019-11-19 14:10:55 +01:00
vfs_plugin.cc libc: support for ioctls via ioctl directory 2019-11-19 14:39:09 +01:00