From dd9b60618228ecaa0ca343839af78b213855d60c Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 11 Apr 2014 18:32:17 +0200 Subject: [PATCH] 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. --- libports/include/libc-plugin/fd_alloc.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libports/include/libc-plugin/fd_alloc.h b/libports/include/libc-plugin/fd_alloc.h index 4d8832ed81..500e397cc0 100644 --- a/libports/include/libc-plugin/fd_alloc.h +++ b/libports/include/libc-plugin/fd_alloc.h @@ -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)