From 0d82070b82b923ce052793485aba594e32c16055 Mon Sep 17 00:00:00 2001 From: Norman Feske <norman.feske@genode-labs.com> Date: Tue, 17 Jun 2014 14:04:38 +0200 Subject: [PATCH] nitpicker: Add label arg to connection constructor --- repos/os/include/nitpicker_session/connection.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/repos/os/include/nitpicker_session/connection.h b/repos/os/include/nitpicker_session/connection.h index 984f297b1e..abef3ec6ef 100644 --- a/repos/os/include/nitpicker_session/connection.h +++ b/repos/os/include/nitpicker_session/connection.h @@ -34,12 +34,15 @@ class Nitpicker::Connection : public Genode::Connection<Session>, /** * Create session and return typed session capability */ - Session_capability _connect(bool stay_top) + Session_capability _connect(bool stay_top, char const *label) { enum { ARGBUF_SIZE = 128 }; char argbuf[ARGBUF_SIZE]; argbuf[0] = 0; + if (Genode::strlen(label) > 0) + Genode::snprintf(argbuf, sizeof(argbuf), "label=\"%s\"", label); + /* * Declare ram-quota donation */ @@ -58,10 +61,10 @@ class Nitpicker::Connection : public Genode::Connection<Session>, /** * Constructor */ - Connection(bool stay_top = false) + Connection(bool stay_top = false, char const *label = "") : /* establish nitpicker session */ - Genode::Connection<Session>(_connect(stay_top)), + Genode::Connection<Session>(_connect(stay_top, label)), Session_client(cap()), /* request frame-buffer and input sub sessions */