From 483d0053501affb8c03bff639c7d3ca47abef39c Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Mon, 23 Apr 2018 08:55:49 +0200 Subject: [PATCH] VFS: detect root dir based on config node type Ref #2782 --- repos/os/include/vfs/dir_file_system.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/repos/os/include/vfs/dir_file_system.h b/repos/os/include/vfs/dir_file_system.h index fd324d2b84..9c2f0c39aa 100644 --- a/repos/os/include/vfs/dir_file_system.h +++ b/repos/os/include/vfs/dir_file_system.h @@ -45,7 +45,7 @@ class Vfs::Dir_file_system : public File_system * * Additionally, the root has an empty _name. */ - bool const _vfs_root { &_env.root_dir() == this }; + bool const _vfs_root; struct Dir_vfs_handle : Vfs_handle { @@ -367,12 +367,12 @@ class Vfs::Dir_file_system : public File_system Genode::Xml_node node, File_system_factory &fs_factory) : - _env(env) + _env(env), _vfs_root(!node.has_type("dir")) { using namespace Genode; /* remember directory name */ - if (node.has_type("fstab") || node.has_type("vfs")) + if (_vfs_root) _name[0] = 0; else node.attribute("name").value(_name, sizeof(_name));