Skip to content

Commit

Permalink
cli_monitor: read subsystem configs from VFS
Browse files Browse the repository at this point in the history
This patch changes the way how CLI monitor obtains its subsystem
configurations. Originally, this information was provided via the
Genode::config mechanism. But for managing complex scenarios, the config
node becomes very complex. Hence, it is preferrable to have a distinct
file for each subsystem configuration.

The CLI monitor scans the directory '/subsystems' for files ending with
".subsystem". Each file has the same syntax as the formerly used
subsystem nodes.
  • Loading branch information
nfeske authored and chelmuth committed Jul 6, 2015
1 parent f917728 commit b4ebefd
Show file tree
Hide file tree
Showing 11 changed files with 944 additions and 642 deletions.
12 changes: 12 additions & 0 deletions repos/os/src/app/cli_monitor/child_registry.h
Expand Up @@ -63,6 +63,18 @@ class Child_registry : public List<Child>
snprintf(suffix, sizeof(suffix), ".%d", cnt + 1);
}
}

/**
* Call functor 'fn' for each child
*
* The functor receives the child name as 'char const *'.
*/
template <typename FN>
void for_each_child_name(FN const &fn) const
{
for (Child const *child = first() ; child; child = child->next())
fn(child->name());
}
};

#endif /* _CHILD_REGISTRY_H_ */

0 comments on commit b4ebefd

Please sign in to comment.