From e60eb0f57fda5d8801f84632f2a476543daf1b52 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 17 Aug 2012 23:10:58 +0200 Subject: [PATCH] noux: pass correct mode to Fs_vfs_handle This patch resolves a problem with running 'noux_gdb.run'. Right at the start, GDB would output a message like: ...cli-script.c:1614: internal-error: called with NULL file pointer! A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) The LOG output hints at the cause of the problem: [init -> noux -> /bin/genode-x86-gdb] fcntl: F_GETFL for libc_fd=3 Thanks to cproc for the fix! --- ports/src/noux/fs_file_system.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/src/noux/fs_file_system.h b/ports/src/noux/fs_file_system.h index a90c4c0d74..7c17dcd20a 100644 --- a/ports/src/noux/fs_file_system.h +++ b/ports/src/noux/fs_file_system.h @@ -410,7 +410,7 @@ namespace Noux { ::File_system::File_handle file = _fs.file(dir, file_name.base() + 1, mode, create); - return new (env()->heap()) Fs_vfs_handle(this, mode, file); + return new (env()->heap()) Fs_vfs_handle(this, sysio->open_in.mode, file); } catch (::File_system::Permission_denied) { error = Sysio::OPEN_ERR_NO_PERM; }