From 7cc754191a73849c27d53b84bfd192eaed3e63ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Thu, 5 Jan 2017 15:23:01 +0100 Subject: [PATCH] blk_cache: remove global env accessor usage Issue #1987. --- repos/os/src/server/blk_cache/driver.h | 6 +++--- repos/os/src/server/blk_cache/lru.cc | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/repos/os/src/server/blk_cache/driver.h b/repos/os/src/server/blk_cache/driver.h index 08dc5205d5..9790083a13 100644 --- a/repos/os/src/server/blk_cache/driver.h +++ b/repos/os/src/server/blk_cache/driver.h @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2013 Genode Labs GmbH + * Copyright (C) 2013-2017 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. @@ -317,7 +317,7 @@ class Driver : public Block::Driver { using namespace Genode; - Parent::Resource_args const args = env()->parent()->yield_request(); + Parent::Resource_args const args = _env.parent().yield_request(); size_t const requested_ram_quota = Arg_string::find_arg(args.string(), "ram_quota").ulong_value(0); @@ -337,7 +337,7 @@ class Driver : public Block::Driver : _env(env), _r_slab(&heap), _alloc(&heap, CACHE_BLK_SIZE), - _blk(&_alloc, Block::Session::TX_QUEUE_SIZE*CACHE_BLK_SIZE), + _blk(_env, &_alloc, Block::Session::TX_QUEUE_SIZE*CACHE_BLK_SIZE), _blk_sz(0), _blk_cnt(0), _cache(heap, 0), diff --git a/repos/os/src/server/blk_cache/lru.cc b/repos/os/src/server/blk_cache/lru.cc index a84e08bdd1..9b51424625 100644 --- a/repos/os/src/server/blk_cache/lru.cc +++ b/repos/os/src/server/blk_cache/lru.cc @@ -5,12 +5,12 @@ */ /* - * Copyright (C) 2013 Genode Labs GmbH + * Copyright (C) 2013-2017 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. */ -#include + #include "lru.h" #include "driver.h"