libc: Add fd status and flags to File_descriptor

Those values need to be stored local to the FD. Including
them in the 'File_descriptor' eases the handling of libc
plugins.
This commit is contained in:
Norman Feske 2014-04-11 18:32:17 +02:00 committed by Christian Helmuth
parent 8e74fdc585
commit dd9b606182

View File

@ -39,10 +39,12 @@ namespace Libc {
struct File_descriptor struct File_descriptor
{ {
int libc_fd; int libc_fd = -1;
char *fd_path; /* for 'fchdir()' */ char *fd_path = 0; /* for 'fchdir', 'fstat' */
Plugin *plugin; Plugin *plugin = 0;
Plugin_context *context; Plugin_context *context = 0;
unsigned flags = 0; /* for 'fcntl' */
unsigned status = 0; /* for 'fcntl' */
Genode::Lock lock; Genode::Lock lock;
void path(char const *newpath) void path(char const *newpath)