l4lx: don't request framebuffer dataspace twice

Fixes #1427
This commit is contained in:
Stefan Kalkowski 2015-03-02 14:33:18 +01:00 committed by Christian Helmuth
parent e5b187ce16
commit 679f66667c
1 changed files with 8 additions and 3 deletions

View File

@ -37,6 +37,12 @@ static Framebuffer::Connection *framebuffer() {
}
static Genode::Dataspace_capability fb_ds() {
static Genode::Dataspace_capability ds = framebuffer()->dataspace();
return ds;
}
extern "C" {
int genode_screen_count()
@ -51,7 +57,7 @@ extern "C" {
{
Linux::Irq_guard guard;
return Genode::Dataspace_client(framebuffer()->dataspace()).size();
return Genode::Dataspace_client(fb_ds()).size();
}
@ -59,8 +65,7 @@ extern "C" {
{
Linux::Irq_guard guard;
return L4lx::Env::env()->rm()->attach(framebuffer()->dataspace(),
"framebuffer");
return L4lx::Env::env()->rm()->attach(fb_ds(), "framebuffer");
}