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
1 changed files with 6 additions and 4 deletions

View File

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