Move Session_label from os to base

Session_label constructor now takes a bare string rather than a
serialized argument buffer.
Replace all instances of previous constructor with 'label_from_args'
function.

Issue #1787
This commit is contained in:
Emery Hemingway 2016-01-12 14:11:58 +01:00 committed by Norman Feske
parent 88b358c5ef
commit f8337b511b
38 changed files with 169 additions and 129 deletions

View File

@ -7,7 +7,7 @@
*/
/*
* Copyright (C) 2006-2013 Genode Labs GmbH
* Copyright (C) 2006-2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -22,6 +22,7 @@
#include <base/tslab.h>
#include <base/lock.h>
#include <base/rpc_server.h>
#include <base/session_label.h>
/* core includes */
#include <pager.h>
@ -38,13 +39,9 @@ namespace Genode { class Cpu_session_component; }
class Genode::Cpu_session_component : public Rpc_object<Cpu_session>
{
public:
typedef Cpu_thread_component::Session_label Session_label;
private:
Session_label _label;
Session_label const _label;
Rpc_entrypoint *_session_ep;
Rpc_entrypoint *_thread_ep;
Pager_entrypoint *_pager_ep;

View File

@ -739,7 +739,7 @@ Platform::Platform() :
uint64_t execution_time = 0;
Nova::sc_ctrl(sc_sel, execution_time);
return { Trace::Session_label("kernel"), Trace::Thread_name(name),
return { Session_label("kernel"), Trace::Thread_name(name),
Trace::Execution_time(execution_time), affinity };
}

View File

@ -0,0 +1,80 @@
/*
* \brief Session label utility class
* \author Emery Hemingway
* \date 2016-07-01
*/
/*
* Copyright (C) 2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__BASE__SESSION_LABEL_H_
#define _INCLUDE__BASE__SESSION_LABEL_H_
#include <base/snprintf.h>
#include <util/arg_string.h>
#include <util/string.h>
namespace Genode { struct Session_label; }
struct Genode::Session_label : String<160>
{
typedef String<capacity()> String;
using String::String;
char const *last_element() const
{
char const * const full = string();
char const * const separator = " -> ";
size_t const full_len = strlen(full);
size_t const separator_len = strlen(separator);
if (full_len < separator_len)
return full;
for (unsigned i = full_len - separator_len; i > 0; --i)
if (!strcmp(separator, full + i, separator_len))
return full + i + separator_len;
return full;
}
};
namespace Genode {
/**
* Extract label from session arguments in the form of 'label="..."'
*/
inline Session_label label_from_args(char const *args)
{
char buf[Session_label::capacity()];
Arg_string::find_arg(args, "label").string(buf, sizeof(buf), "");
return Session_label(buf);
}
/**
* Create a compound label in the form of 'prefix -> label'
*/
inline Session_label prefixed_label(char const *prefix, char const *label)
{
if (!*prefix)
return Session_label(label);
if (!*label)
return Session_label(prefix);
char buf[Session_label::capacity()];
snprintf(buf, sizeof(buf), "%s -> %s", prefix, label);
return Session_label(buf);
}
}
#endif /* _INCLUDE__BASE__SESSION_LABEL_H_ */

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (C) 2013 Genode Labs GmbH
* Copyright (C) 2013-2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -17,6 +17,7 @@
/* Genode includes */
#include <util/string.h>
#include <base/affinity.h>
#include <base/session_label.h>
namespace Genode { namespace Trace {
@ -33,7 +34,6 @@ namespace Genode { namespace Trace {
struct Traced_by_other_session : Exception { };
struct Subject_not_traced : Exception { };
typedef String<160> Session_label;
typedef String<32> Thread_name;
struct Policy_id;

View File

@ -18,7 +18,7 @@
*/
/*
* Copyright (C) 2006-2013 Genode Labs GmbH
* Copyright (C) 2006-2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.

View File

@ -7,7 +7,7 @@
*/
/*
* Copyright (C) 2006-2013 Genode Labs GmbH
* Copyright (C) 2006-2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -246,6 +246,7 @@ Cpu_session_component::Cpu_session_component(Rpc_entrypoint *session_ep,
Affinity const &affinity,
size_t const quota)
:
_label(label_from_args(args)),
_session_ep(session_ep),
_thread_ep(thread_ep), _pager_ep(pager_ep),
_md_alloc(md_alloc, remaining_session_ram_quota(args)),
@ -257,11 +258,6 @@ Cpu_session_component::Cpu_session_component(Rpc_entrypoint *session_ep,
_trace_sources(trace_sources), _quota(quota), _ref(0),
_native_cpu(*this, args)
{
/* remember session label */
char buf[Session_label::size()];
Arg_string::find_arg(args, "label").string(buf, sizeof(buf), "");
_label = Session_label(buf);
Arg a = Arg_string::find_arg(args, "priority");
if (a.valid()) {
_priority = a.ulong_value(0);

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (C) 2006-2013 Genode Labs GmbH
* Copyright (C) 2006-2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -20,6 +20,7 @@
#include <base/lock.h>
#include <base/rpc_server.h>
#include <cpu_session/cpu_session.h>
#include <base/session_label.h>
/* core includes */
#include <pager.h>
@ -37,13 +38,9 @@ namespace Genode { class Cpu_session_component; }
class Genode::Cpu_session_component : public Rpc_object<Cpu_session>,
public List<Cpu_session_component>::Element
{
public:
typedef Cpu_thread_component::Session_label Session_label;
private:
Session_label _label;
Session_label const _label;
Rpc_entrypoint * const _session_ep;
Rpc_entrypoint *_thread_ep;
Pager_entrypoint *_pager_ep;

View File

@ -18,6 +18,7 @@
#include <util/list.h>
#include <base/rpc_server.h>
#include <cpu_thread/cpu_thread.h>
#include <base/session_label.h>
/* core includes */
#include <pager.h>
@ -36,7 +37,6 @@ class Genode::Cpu_thread_component : public Rpc_object<Cpu_thread>,
{
public:
typedef Trace::Session_label Session_label;
typedef Trace::Thread_name Thread_name;
private:

View File

@ -38,15 +38,12 @@ class Genode::Trace::Root : public Genode::Root_component<Session_component>
size_t arg_buffer_size = Arg_string::find_arg(args, "arg_buffer_size").ulong_value(0);
unsigned parent_levels = Arg_string::find_arg(args, "parent_levels").ulong_value(0);
char label[Trace::Session_label::size()];
Arg_string::find_arg(args, "label").string(label, sizeof(label), "");
if (arg_buffer_size > ram_quota)
throw Root::Invalid_args();
return new (md_alloc())
Session_component(*md_alloc(), ram_quota, arg_buffer_size,
parent_levels, label, _sources, _policies);
parent_levels, label_from_args(args).string(), _sources, _policies);
}
void _upgrade_session(Session_component *s, const char *args)

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (C) 2014 Genode Labs GmbH
* Copyright (C) 2014-2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -790,10 +790,10 @@ class Usb::Root : public Genode::Root_component<Session_component>
{
using namespace Genode;
Session_label const label = label_from_args(args);
try {
Xml_node config_node = Lx_kit::env().config_rom().xml();
Xml_node raw = config_node.sub_node("raw");
Genode::Session_label label(args);
Genode::Session_policy policy(label, raw);
size_t ram_quota = Arg_string::find_arg(args, "ram_quota" ).ulong_value(0);
@ -822,7 +822,7 @@ class Usb::Root : public Genode::Root_component<Session_component>
return session;
} catch (Genode::Session_policy::No_policy_defined) {
error("Invalid session request, no matching policy for '",
Genode::Session_label(args).string(), "'");
label.string(), "'");
throw Genode::Root::Unavailable();
}
}

View File

@ -6,7 +6,7 @@
*/
/*
* Copyright (C) 2014 Genode Labs GmbH
* Copyright (C) 2014-2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -374,7 +374,7 @@ class File_system::Root : public Root_component<Session_component>
Genode::Path<MAX_PATH_LEN> session_root;
bool writeable = false;
Session_label const label(args);
Session_label const label = label_from_args(args);
size_t ram_quota =
Arg_string::find_arg(args, "ram_quota").aligned_size();

View File

@ -6,7 +6,7 @@
*/
/*
* Copyright (C) 2006-2013 Genode Labs GmbH
* Copyright (C) 2006-2016 Genode Labs GmbH
* Copyright (C) 2012 Intel Corporation
*
* This file is part of the Genode OS framework, which is distributed

View File

@ -87,7 +87,7 @@ struct Launcher::Main
void _handle_exited_child(unsigned)
{
auto kill_child_fn = [&] (Child_base::Label label) { _panel_dialog.kill(label); };
auto kill_child_fn = [&] (Label const &label) { _panel_dialog.kill(label); };
_subsystem_manager.for_each_exited_child(kill_child_fn);
}

View File

@ -509,7 +509,7 @@ class Launcher::Panel_dialog : Input_event_handler, Dialog_generator,
_context_dialog.visible(false);
}
void kill(Child_base::Label const &label)
void kill(Label const &label)
{
_kill(label);
}

View File

@ -204,8 +204,8 @@ class Launcher::Subsystem_manager
{
Child::Binary_name const binary_name = _binary_name(subsystem);
Child::Label const label = string_attribute(subsystem, "name",
Child::Label(""));
Label const label = string_attribute(subsystem, "name",
Label(""));
Ram_config const ram_config = _ram_config(subsystem);
@ -237,7 +237,7 @@ class Launcher::Subsystem_manager
void kill(char const *label)
{
for (Child *c = _children.first(); c; c = c->next()) {
if (c->label() == Child::Label(label)) {
if (c->label() == Label(label)) {
_children.remove(c);
destroy(env()->heap(), c);
return;
@ -248,7 +248,7 @@ class Launcher::Subsystem_manager
/**
* Call functor for each exited child
*
* The functor takes a 'Child_base::Label' as argument.
* The functor takes a 'Label' as argument.
*/
template <typename FUNC>
void for_each_exited_child(FUNC const &func)
@ -257,7 +257,7 @@ class Launcher::Subsystem_manager
for (Child *child = _children.first(); child; child = next) {
next = child->next();
if (child->exited())
func(child->label());
func(Label(child->label().string()));
}
}
};

View File

@ -228,7 +228,7 @@ namespace Terminal {
Genode::size_t io_buffer_size = 4096;
try {
Genode::Session_label label(args);
Genode::Session_label label = Genode::label_from_args(args);
Genode::Session_policy policy(label);
char filename[256];

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (C) 2011-2013 Genode Labs GmbH
* Copyright (C) 2011-2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -469,26 +469,28 @@ namespace Terminal {
Session_component *_create_session(const char *args)
{
using namespace Genode;
/*
* XXX read I/O buffer size from args
*/
Genode::size_t io_buffer_size = 4096;
size_t io_buffer_size = 4096;
try {
Genode::Session_label label(args);
Genode::Session_policy policy(label);
Session_label const label = label_from_args(args);
Session_policy policy(label);
unsigned tcp_port = 0;
policy.attribute("port").value(&tcp_port);
return new (md_alloc())
Session_component(io_buffer_size, tcp_port);
} catch (Genode::Xml_node::Nonexistent_attribute) {
PERR("Missing \"port\" attribute in policy definition");
throw Genode::Root::Unavailable();
} catch (Genode::Session_policy::No_policy_defined) {
PERR("Invalid session request, no matching policy");
throw Genode::Root::Unavailable();
} catch (Xml_node::Nonexistent_attribute) {
error("Missing \"port\" attribute in policy definition");
throw Root::Unavailable();
} catch (Session_policy::No_policy_defined) {
error("Invalid session request, no matching policy");
throw Root::Unavailable();
}
}

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (C) 2014 Genode Labs GmbH
* Copyright (C) 2014-2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -1108,8 +1108,8 @@ class Wm::Nitpicker::Root : public Genode::Rpc_object<Genode::Typed_root<Session
Genode::Session_capability session(Session_args const &args,
Affinity const &affinity) override
{
Genode::Session_label session_label(args.string());
Genode::Session_label const session_label =
Genode::label_from_args(args.string());
enum Role { ROLE_DECORATOR, ROLE_LAYOUTER, ROLE_REGULAR, ROLE_DIRECT };
Role role = ROLE_REGULAR;

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (C) 2012-2013 Genode Labs GmbH
* Copyright (C) 2012-2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -877,7 +877,7 @@ namespace File_system {
char root[ROOT_MAX_LEN];
root[0] = 0;
Session_label label(args);
Session_label const label = label_from_args(args);
try {
Session_policy policy(label);

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (C) 2013 Genode Labs GmbH
* Copyright (C) 2013-2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -446,7 +446,7 @@ class File_system::Root : public Root_component<Session_component>
char root[ROOT_MAX_LEN];
root[0] = 0;
Session_label label(args);
Session_label const label = label_from_args(args);
try {
Session_policy policy(label);

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (C) 2010-2013 Genode Labs GmbH
* Copyright (C) 2010-2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -177,10 +177,8 @@ namespace Init {
if (!service_matches)
return false;
typedef Genode::String<128> Label;
Label const session_label =
Label(skip_label_prefix(child_name, Genode::Session_label(args).string()));
Genode::Session_label const session_label(skip_label_prefix(
child_name, Genode::label_from_args(args).string()));
return !Genode::Xml_node_label_score(service_node, session_label).conflict();
}

View File

@ -18,6 +18,7 @@
#include <base/service.h>
#include <base/child.h>
#include <base/rpc_server.h>
#include <base/session_label.h>
#include <util/arg_string.h>
#include <rom_session/connection.h>
@ -93,17 +94,13 @@ class Init::Child_policy_enforce_labeling
{
using namespace Genode;
char label_buf[Parent::Session_args::MAX_SIZE];
Arg_string::find_arg(args, "label").string(label_buf, sizeof(label_buf), "");
char value_buf[Parent::Session_args::MAX_SIZE];
Genode::snprintf(value_buf, sizeof(value_buf),
"\"%s%s%s\"",
_name,
Genode::strcmp(label_buf, "") == 0 ? "" : " -> ",
label_buf);
Arg_string::set_arg(args, args_len, "label", value_buf);
Session_label const old_label = label_from_args(args);
if (old_label == "") {
Arg_string::set_arg_string(args, args_len, "label", _name);
} else {
Session_label const new_label = prefixed_label(_name, old_label.string());
Arg_string::set_arg_string(args, args_len, "label", new_label.string());
}
}
};

View File

@ -16,11 +16,11 @@
#include <util/arg_string.h>
#include <os/config.h>
#include <base/session_label.h>
namespace Genode {
struct Xml_node_label_score;
struct Session_label;
class Session_policy;
}
@ -153,30 +153,6 @@ struct Genode::Xml_node_label_score
};
struct Genode::Session_label : String<128>
{
Session_label() { }
/**
* Constructor
*
* \param args session arguments as null-terminated string
*
* The constructor extracts the label from the supplied session-argument
* string.
*/
explicit Session_label(char const *args)
{
typedef String<128> String;
char buf[String::capacity()];
Arg_string::find_arg(args, "label").string(buf, sizeof(buf),
"<undefined>");
*static_cast<String *>(this) = String(buf);
}
};
/**
* Query server-side policy for a session request
*/

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (C) 2014 Genode Labs GmbH
* Copyright (C) 2014-2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -116,7 +116,7 @@ struct Report::Root : Genode::Root_component<Session_component>
Arg_string::find_arg(args, "buffer_size").ulong_value(0);
return new (md_alloc())
Session_component(Genode::Session_label(args), buffer_size,
Session_component(label_from_args(args), buffer_size,
_rom_registry, _verbose);
}

View File

@ -170,7 +170,7 @@ class Rom::Root : public Genode::Root_component<Session_component>
using namespace Genode;
return new (md_alloc())
Session_component(_registry, Session_label(args));
Session_component(_registry, label_from_args(args));
}
public:

View File

@ -504,7 +504,8 @@ namespace Platform {
_device_slab(&_md_alloc),
_device_pd_ep(device_pd_ep),
_resources(_md_alloc),
_label(args), _policy(_label)
_label(Genode::label_from_args(args)),
_policy(_label)
{
/* non-pci devices */
_policy.for_each_sub_node("device", [&] (Genode::Xml_node device_node) {
@ -1073,7 +1074,7 @@ class Platform::Root : public Genode::Root_component<Session_component>
args, _device_pd_ep);
} catch (Genode::Session_policy::No_policy_defined) {
PERR("Invalid session request, no matching policy for '%s'",
Genode::Session_label(args).string());
Genode::label_from_args(args).string());
throw Genode::Root::Unavailable();
}
}

View File

@ -221,7 +221,7 @@ namespace Uart {
Session_component *_create_session(const char *args)
{
try {
Session_label label(args);
Session_label label = label_from_args(args);
Session_policy policy(label);
unsigned index = 0;

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (C) 2015 Genode Labs GmbH
* Copyright (C) 2015-2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -72,7 +72,7 @@ class Fs_log::Root_component :
dir_path[0] = '/';
bool truncate = false;
Session_label session_label(args);
Session_label const session_label = label_from_args(args);
char const *label_str = session_label.string();
char const *label_prefix = "";

View File

@ -23,6 +23,7 @@
#include <util/avl_string.h>
#include <util/misc_math.h>
#include <os/attached_ram_dataspace.h>
#inlcude <base/session_label.h>
/* local includes */
#include "iso9660.h"

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (C) 2012-2013 Genode Labs GmbH
* Copyright (C) 2012-2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -336,7 +336,7 @@ class File_system::Root : public Root_component<Session_component>
char root[ROOT_MAX_LEN];
root[0] = 0;
Session_label label(args);
Session_label const label = label_from_args(args);
try {
Session_policy policy(label);

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (C) 2010-2013 Genode Labs GmbH
* Copyright (C) 2010-2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -198,14 +198,12 @@ class Net::Root : public Genode::Root_component<Net::Session_component>
memset(ip_addr, 0, MAX_IP_ADDR_LENGTH);
try {
Session_label label(args);
Session_label const label = label_from_args(args);
Session_policy policy(label, _config);
policy.attribute("ip_addr").value(ip_addr, sizeof(ip_addr));
} catch (Xml_node::Nonexistent_attribute) {
Genode::log("Missing \"ip_addr\" attribute in policy definition");
} catch (Session_policy::No_policy_defined) {
Genode::log("Invalid session request, no matching policy");;
}
} catch (Session_policy::No_policy_defined) { }
size_t ram_quota =
Arg_string::find_arg(args, "ram_quota" ).ulong_value(0);

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (C) 2006-2013 Genode Labs GmbH
* Copyright (C) 2006-2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -30,7 +30,7 @@ struct Background : private Texture_base, Session, View
*/
Background(Area size)
:
Texture_base(Area(0, 0)), Session(Genode::Session_label("label=\"\"")),
Texture_base(Area(0, 0)), Session(Genode::Session_label()),
View(*this, View::NOT_TRANSPARENT, View::BACKGROUND, 0),
color(25, 37, 50)
{

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (C) 2006-2013 Genode Labs GmbH
* Copyright (C) 2006-2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -1037,11 +1037,11 @@ class Nitpicker::Root : public Genode::Root_component<Session_component>
size_t const unused_quota = ram_quota - required_quota;
Session_label const label(args);
bool const provides_default_bg = (strcmp(label.string(), "backdrop") == 0);
Genode::Session_label const label = Genode::label_from_args(args);
bool const provides_default_bg = (label == "backdrop");
Session_component *session = new (md_alloc())
Session_component(Session_label(args), _view_stack, _mode,
Session_component(label, _view_stack, _mode,
_pointer_origin, *ep(), _framebuffer,
provides_default_bg, *md_alloc(), unused_quota,
_focus_reporter);

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (C) 2014 Genode Labs GmbH
* Copyright (C) 2014-2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -21,7 +21,7 @@ struct Pointer_origin : Session, View
{
Pointer_origin()
:
Session(Genode::Session_label("")),
Session(Genode::Session_label()),
View(*this, View::TRANSPARENT, View::NOT_BACKGROUND, 0)
{ }

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (C) 2013-2015 Genode Labs GmbH
* Copyright (C) 2013-2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -208,7 +208,7 @@ class Block::Root :
{
long num = -1;
Session_label label(args);
Session_label const label = label_from_args(args);
char const *label_str = label.string();
try {
Session_policy policy(label);

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (C) 2012-2013 Genode Labs GmbH
* Copyright (C) 2012-2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -433,7 +433,7 @@ namespace File_system {
char root[ROOT_MAX_LEN];
root[0] = 0;
Session_label label(args);
Session_label const label = label_from_args(args);
try {
Session_policy policy(label);

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (C) 2014 Genode Labs GmbH
* Copyright (C) 2014-2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
@ -947,7 +947,7 @@ class File_system::Root : public Root_component<Session_component>
Genode::Number_of_bytes buffer_size_max = 1 * (1 << 20); /* 1 MiB */
unsigned trace_parent_levels = 0;
Session_label label(args);
Session_label const label = label_from_args(args);
try {
Session_policy policy(label);

View File

@ -593,7 +593,7 @@ class Vfs_server::Root :
Path session_root;
bool writeable = false;
Session_label const label(args);
Session_label const label = label_from_args(args);
char tmp[MAX_PATH_LEN];
try {