mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-15 21:58:24 +00:00
libc: configurable initial FDs
The libc already supports the configuration of 'stdin', 'stdout', and 'stderr' using '<libc>' config attributes. This patch equips the libc with the additional ability to pre-initialize any other file descriptor. A file descriptor is configured as follows: <config> ... <libc ...> <fd id="3" path="/dev/log" writeable="yes" readable="no" seek="10"/> ... </libc> </config> Furthermore, this patch moves the FD initialization code from the VFS plugin to the libc kernel initialization because opening the FDs depends on 'malloc' ('strdup'), which should not be used at early 'Libc::Kernel' initialization time. Issue #3478
This commit is contained in:
committed by
Christian Helmuth
parent
6e38b53001
commit
65f75589e9
@ -109,6 +109,11 @@ namespace Libc {
|
||||
*/
|
||||
void free(File_descriptor *fdo);
|
||||
|
||||
/**
|
||||
* Prevent the use of the specified file descriptor
|
||||
*/
|
||||
void preserve(int libc_fd);
|
||||
|
||||
File_descriptor *find_by_libc_fd(int libc_fd);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user