noux: pass correct paths for stdio to Vfs_io_channel

Pass both paths, absolute path to the mount point and the relative path
from the mount point to the file, along with an open handle rather than
just an absolute path. Otherwise, fstat fails if the addressed file is
implemented by another VFS plugin.

Fixes #1789
This commit is contained in:
Emery Hemingway 2015-11-24 14:41:28 +01:00 committed by Norman Feske
parent 5f371c9a3d
commit e09752a26f

View File

@ -1062,7 +1062,7 @@ static Noux::Io_channel *connect_stdio(Vfs::Dir_file_system &root,
}
return new (Genode::env()->heap())
Vfs_io_channel("", path, &root, vfs_handle, sig_rec);
Vfs_io_channel(path, root.leaf_path(path), &root, vfs_handle, sig_rec);
} catch (Genode::Xml_node::Nonexistent_attribute) {
PWRN("%s VFS path not defined, connecting to Terminal session", stdio_name);