diff --git a/ports/include/noux_session/capability.h b/ports/include/noux_session/capability.h
index 160c34d35a..e262ead280 100644
--- a/ports/include/noux_session/capability.h
+++ b/ports/include/noux_session/capability.h
@@ -17,6 +17,6 @@
#include
#include
-namespace Noux { typedef Genode::Capability Session_capability; }
+namespace Noux { typedef Capability Session_capability; }
#endif /* _INCLUDE__NOUX_SESSION__CAPABILITY_H_ */
diff --git a/ports/include/noux_session/client.h b/ports/include/noux_session/client.h
index 76b97a45a4..7779799c93 100644
--- a/ports/include/noux_session/client.h
+++ b/ports/include/noux_session/client.h
@@ -21,13 +21,13 @@
namespace Noux {
- struct Session_client : Genode::Rpc_client
+ struct Session_client : Rpc_client
{
explicit Session_client(Session_capability session)
- : Genode::Rpc_client(session) { }
+ : Rpc_client(session) { }
- Genode::Dataspace_capability sysio_dataspace()
+ Dataspace_capability sysio_dataspace()
{
return call();
}
diff --git a/ports/include/noux_session/noux_session.h b/ports/include/noux_session/noux_session.h
index bd76b8fa6f..f51439d5db 100644
--- a/ports/include/noux_session/noux_session.h
+++ b/ports/include/noux_session/noux_session.h
@@ -23,13 +23,15 @@
namespace Noux {
+ using namespace Genode;
+
struct Session : Genode::Session
{
static const char *service_name() { return "Noux"; }
virtual ~Session() { }
- virtual Genode::Dataspace_capability sysio_dataspace() = 0;
+ virtual Dataspace_capability sysio_dataspace() = 0;
enum Syscall {
SYSCALL_GETCWD,
@@ -96,7 +98,7 @@ namespace Noux {
** RPC declaration **
*********************/
- GENODE_RPC(Rpc_sysio_dataspace, Genode::Dataspace_capability, sysio_dataspace);
+ GENODE_RPC(Rpc_sysio_dataspace, Dataspace_capability, sysio_dataspace);
GENODE_RPC(Rpc_syscall, bool, syscall, Syscall);
GENODE_RPC_INTERFACE(Rpc_sysio_dataspace, Rpc_syscall);
diff --git a/ports/include/noux_session/sysio.h b/ports/include/noux_session/sysio.h
index 4183ccf8bf..da4be46513 100644
--- a/ports/include/noux_session/sysio.h
+++ b/ports/include/noux_session/sysio.h
@@ -29,6 +29,8 @@
namespace Noux {
+ using namespace Genode;
+
struct Sysio
{
/*
@@ -65,7 +67,7 @@ namespace Noux {
struct Stat
{
- Genode::size_t size;
+ size_t size;
unsigned mode;
unsigned uid;
unsigned gid;
@@ -148,7 +150,7 @@ namespace Noux {
* Return total number of file descriptors contained in the array
*/
size_t total_fds() const {
- return Genode::min(num_rd + num_wr + num_ex, (size_t)MAX_FDS); }
+ return min(num_rd + num_wr + num_ex, (size_t)MAX_FDS); }
/**
* Check for maximum population of fds array
@@ -240,7 +242,7 @@ namespace Noux {
SYSIO_DECL(fchdir, { int fd; }, { });
- SYSIO_DECL(read, { int fd; Genode::size_t count; },
+ SYSIO_DECL(read, { int fd; size_t count; },
{ Chunk chunk; size_t count; });
SYSIO_DECL(execve, { Path filename; Args args; Env env; }, { });
@@ -248,8 +250,8 @@ namespace Noux {
SYSIO_DECL(select, { Select_fds fds; Select_timeout timeout; },
{ Select_fds fds; });
- SYSIO_DECL(fork, { Genode::addr_t ip; Genode::addr_t sp;
- Genode::addr_t parent_cap_addr; },
+ SYSIO_DECL(fork, { addr_t ip; addr_t sp;
+ addr_t parent_cap_addr; },
{ int pid; });
SYSIO_DECL(getpid, { }, { int pid; });
diff --git a/ports/src/noux/args.h b/ports/src/noux/args.h
index c48aa958a8..54bbeabae0 100644
--- a/ports/src/noux/args.h
+++ b/ports/src/noux/args.h
@@ -25,11 +25,11 @@ namespace Noux {
{
protected:
- char * const _buf;
- Genode::size_t const _buf_size;
- Genode::size_t _len;
+ char * const _buf;
+ size_t const _buf_size;
+ size_t _len;
- Genode::size_t _free_size() const
+ size_t _free_size() const
{
/*
* Keep space for two trailing zeros, indicating the end of the
@@ -49,7 +49,7 @@ namespace Noux {
* \param buf_size size of argument buffer in character,
* must be at least 2
*/
- Args(char *buf, Genode::size_t buf_size)
+ Args(char *buf, size_t buf_size)
: _buf(buf), _buf_size(buf_size), _len(0)
{
if (buf_size <= 2)
@@ -67,18 +67,18 @@ namespace Noux {
bool valid() const { return _buf_size > 0; }
- Genode::size_t len() const { return _len; }
+ size_t len() const { return _len; }
char const * const base() const { return _buf; }
void append(char const *arg)
{
- Genode::size_t const arg_len = Genode::strlen(arg);
+ size_t const arg_len = strlen(arg);
if (arg_len > _free_size())
throw Overrun();
- Genode::strncpy(_buf + _len, arg, _buf_size - _len);
+ strncpy(_buf + _len, arg, _buf_size - _len);
_len += arg_len + 1; /* keep null termination between strings */
@@ -89,27 +89,27 @@ namespace Noux {
void dump()
{
for (unsigned i = 0, j = 0; _buf[i] && (i < _buf_size - 2);
- i += Genode::strlen(&_buf[i]) + 1, j++)
+ i += strlen(&_buf[i]) + 1, j++)
PINF("arg(%u): \"%s\"", j, &_buf[i]);
}
};
- class Args_dataspace : private Genode::Attached_ram_dataspace, public Args
+ class Args_dataspace : private Attached_ram_dataspace, public Args
{
public:
- Args_dataspace(Genode::size_t size, Args const &from = Args())
+ Args_dataspace(size_t size, Args const &from = Args())
:
- Genode::Attached_ram_dataspace(Genode::env()->ram_session(), size),
+ Attached_ram_dataspace(env()->ram_session(), size),
Args(local_addr(), size)
{
if (from.len() > size - 2)
throw Overrun();
- Genode::memcpy(_buf, from.base(), from.len() + 1);
+ memcpy(_buf, from.base(), from.len() + 1);
}
- using Genode::Attached_ram_dataspace::cap;
+ using Attached_ram_dataspace::cap;
};
}
diff --git a/ports/src/noux/child.h b/ports/src/noux/child.h
index 4f77eb6f23..bf53a822e0 100644
--- a/ports/src/noux/child.h
+++ b/ports/src/noux/child.h
@@ -33,9 +33,6 @@
namespace Noux {
- using namespace Genode;
-
-
/**
* Allocator for process IDs
*/
@@ -92,12 +89,12 @@ namespace Noux {
init_process_exited();
} else {
/* destroy 'Noux::Child' */
- destroy(Genode::env()->heap(), _child);
+ destroy(env()->heap(), _child);
PINF("destroy %p", _child);
PINF("quota: avail=%zd, used=%zd",
- Genode::env()->ram_session()->avail(),
- Genode::env()->ram_session()->used());
+ env()->ram_session()->avail(),
+ env()->ram_session()->used());
}
}
};
diff --git a/ports/src/noux/dataspace_registry.h b/ports/src/noux/dataspace_registry.h
index ad5e9df570..20ea973004 100644
--- a/ports/src/noux/dataspace_registry.h
+++ b/ports/src/noux/dataspace_registry.h
@@ -19,9 +19,6 @@
namespace Noux {
- using namespace Genode;
-
-
class Dataspace_registry;
@@ -96,7 +93,7 @@ namespace Noux {
return;
_pool.remove(info);
- destroy(Genode::env()->heap(), info);
+ destroy(env()->heap(), info);
}
}
diff --git a/ports/src/noux/directory_service.h b/ports/src/noux/directory_service.h
index 310318cb3d..64b808f810 100644
--- a/ports/src/noux/directory_service.h
+++ b/ports/src/noux/directory_service.h
@@ -29,8 +29,8 @@ namespace Noux {
*/
struct Directory_service
{
- virtual Genode::Dataspace_capability dataspace(char const *path) = 0;
- virtual void release(Genode::Dataspace_capability) = 0;
+ virtual Dataspace_capability dataspace(char const *path) = 0;
+ virtual void release(Dataspace_capability) = 0;
virtual Vfs_handle *open(Sysio *sysio, char const *path) = 0;
diff --git a/ports/src/noux/environment.h b/ports/src/noux/environment.h
index 19be776dc3..97c00e8bc7 100644
--- a/ports/src/noux/environment.h
+++ b/ports/src/noux/environment.h
@@ -27,8 +27,7 @@ namespace Noux {
/**
* Front-end for PWD environment variable
*/
- class Environment : private Genode::Attached_ram_dataspace,
- public Pwd
+ class Environment : private Attached_ram_dataspace, public Pwd
{
private:
@@ -44,14 +43,13 @@ namespace Noux {
* \param env comma-separated list of environment variables
*/
Environment(char const *env) :
- Genode::Attached_ram_dataspace(Genode::env()->ram_session(),
- ENV_DS_SIZE),
+ Attached_ram_dataspace(Genode::env()->ram_session(), ENV_DS_SIZE),
_env(local_addr())
{
- Genode::strncpy(_env, env, ENV_DS_SIZE);
+ strncpy(_env, env, ENV_DS_SIZE);
}
- using Genode::Attached_ram_dataspace::cap;
+ using Attached_ram_dataspace::cap;
/**
* Return list of environment variables as comma-separated list
@@ -88,7 +86,7 @@ namespace Noux {
return;
}
- Genode::Arg_string::set_arg(_env, ENV_DS_SIZE, "PWD", quoted);
+ Arg_string::set_arg(_env, ENV_DS_SIZE, "PWD", quoted);
PINF("changed current work directory to %s", _pwd_path.base());
}
};
diff --git a/ports/src/noux/file_system.h b/ports/src/noux/file_system.h
index c7fd5b6d91..7ae9adb8f5 100644
--- a/ports/src/noux/file_system.h
+++ b/ports/src/noux/file_system.h
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (C) 2011-2012 Genode Labs GmbH
+ * Copyright (C) 2011-2012 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.
@@ -27,7 +27,7 @@
namespace Noux {
class File_system : public Directory_service, public File_io_service,
- public Genode::List::Element
+ public List::Element
{
private:
@@ -38,7 +38,6 @@ namespace Noux {
*/
void _strip_trailing_slashes_from_mount_point()
{
- using namespace Genode;
size_t len;
while ((len = strlen(_mount_point)) && (_mount_point[len - 1] == '/'))
_mount_point[len - 1] = 0;
@@ -46,7 +45,7 @@ namespace Noux {
public:
- File_system(Genode::Xml_node config)
+ File_system(Xml_node config)
{
enum { TYPE_MAX_LEN = 64 };
char type[TYPE_MAX_LEN];
@@ -60,7 +59,7 @@ namespace Noux {
File_system(char const *mount_point)
{
- Genode::strncpy(_mount_point, mount_point, sizeof(_mount_point));
+ strncpy(_mount_point, mount_point, sizeof(_mount_point));
_strip_trailing_slashes_from_mount_point();
}
@@ -78,8 +77,6 @@ namespace Noux {
*/
char const *local_path(char const *global_path)
{
- using namespace Genode;
-
size_t const mount_point_len = strlen(_mount_point);
if (strlen(global_path) < mount_point_len)
diff --git a/ports/src/noux/io_channel.h b/ports/src/noux/io_channel.h
index a6de7cb2ba..2ecec4cbe9 100644
--- a/ports/src/noux/io_channel.h
+++ b/ports/src/noux/io_channel.h
@@ -28,8 +28,6 @@
namespace Noux {
- using namespace Genode;
-
/**
* Input/output channel interface
*/
diff --git a/ports/src/noux/local_rm_service.h b/ports/src/noux/local_rm_service.h
index bd814cd128..f79286634f 100644
--- a/ports/src/noux/local_rm_service.h
+++ b/ports/src/noux/local_rm_service.h
@@ -23,9 +23,6 @@
namespace Noux {
- using namespace Genode;
-
-
class Rm_dataspace_info : public Dataspace_info
{
private:
@@ -59,7 +56,7 @@ namespace Noux {
~Rm_dataspace_info()
{
_ep.dissolve(_sub_rm);
- destroy(Genode::env()->heap(), _sub_rm);
+ destroy(env()->heap(), _sub_rm);
}
Rm_session_capability rm_cap() { return _rm_cap; }
@@ -138,7 +135,7 @@ namespace Noux {
Dataspace_info *info = _ds_registry.lookup_info(ds_cap);
if (info) {
_ds_registry.remove(info);
- destroy(Genode::env()->heap(), info);
+ destroy(env()->heap(), info);
} else {
PWRN("Could not lookup dataspace info for local RM session");
}
diff --git a/ports/src/noux/path.h b/ports/src/noux/path.h
index 6ea820b2c4..af483ebcf0 100644
--- a/ports/src/noux/path.h
+++ b/ports/src/noux/path.h
@@ -37,7 +37,7 @@ namespace Noux {
static bool ends_with(char c, char const *path)
{
- return path[0] && (path[Genode::strlen(path) - 1] == c);
+ return path[0] && (path[strlen(path) - 1] == c);
}
static void remove_char(char *buf)
@@ -70,7 +70,7 @@ namespace Noux {
static bool is_empty(char const *path)
{
- return Genode::strlen(path) == 0;
+ return strlen(path) == 0;
}
/**
@@ -133,8 +133,8 @@ namespace Noux {
Path_base(const Path_base &);
- char * const _path;
- Genode::size_t const _path_max_len;
+ char * const _path;
+ size_t const _path_max_len;
/**
* Append 'path'
@@ -143,12 +143,12 @@ namespace Noux {
*/
void _append(char const *path)
{
- Genode::size_t const orig_len = Genode::strlen(_path);
+ size_t const orig_len = strlen(_path);
- if (Genode::strlen(path) + orig_len + 1 >= _path_max_len)
+ if (strlen(path) + orig_len + 1 >= _path_max_len)
throw Path_too_long();
- Genode::strncpy(_path + orig_len, path, _path_max_len - orig_len);
+ strncpy(_path + orig_len, path, _path_max_len - orig_len);
}
void _append_slash_if_needed()
@@ -175,14 +175,14 @@ namespace Noux {
* Validate 'pwd' argument, if not supplied, enforce invariant
* that 'pwd' is an absolute path.
*/
- if (!pwd || Genode::strlen(pwd) == 0)
+ if (!pwd || strlen(pwd) == 0)
pwd = "/";
/*
* Use argument path if absolute
*/
if (is_absolute(path))
- Genode::strncpy(_path, path, _path_max_len);
+ strncpy(_path, path, _path_max_len);
/*
* Otherwise, concatenate current working directory with
@@ -191,7 +191,7 @@ namespace Noux {
else {
const char *const relative_path = path;
- Genode::strncpy(_path, pwd, _path_max_len);
+ strncpy(_path, pwd, _path_max_len);
if (!is_empty(relative_path)) {
@@ -207,7 +207,7 @@ namespace Noux {
public:
- Path_base(char *buf, Genode::size_t buf_len,
+ Path_base(char *buf, size_t buf_len,
char const *path, char const *pwd = 0)
:
_path(buf), _path_max_len(buf_len)
@@ -217,8 +217,8 @@ namespace Noux {
void import(char const *path) { _import(path); }
- char *base() { return _path; }
- Genode::size_t max_len() { return _path_max_len; }
+ char *base() { return _path; }
+ size_t max_len() { return _path_max_len; }
void remove_trailing(char c) { remove_trailing(c, _path); }
@@ -231,15 +231,15 @@ namespace Noux {
*dst = 0;
}
- bool equals(Path_base const &ref) const { return Genode::strcmp(ref._path, _path) == 0; }
+ bool equals(Path_base const &ref) const { return strcmp(ref._path, _path) == 0; }
- bool equals(char const *str) const { return Genode::strcmp(str, _path) == 0; }
+ bool equals(char const *str) const { return strcmp(str, _path) == 0; }
bool strip_prefix(char const *prefix)
{
- unsigned prefix_len = Genode::strlen(prefix);
+ unsigned prefix_len = strlen(prefix);
- if (Genode::strcmp(prefix, _path, prefix_len) != 0)
+ if (strcmp(prefix, _path, prefix_len) != 0)
return false;
if (prefix_len > 0 && ends_with('/', prefix))
diff --git a/ports/src/noux/pipe_io_channel.h b/ports/src/noux/pipe_io_channel.h
index d5d630f1a2..99e3494613 100644
--- a/ports/src/noux/pipe_io_channel.h
+++ b/ports/src/noux/pipe_io_channel.h
@@ -19,8 +19,6 @@
namespace Noux {
- using namespace Genode;
-
class Pipe : public Reference_counter
{
private:
diff --git a/ports/src/noux/ram_session_component.h b/ports/src/noux/ram_session_component.h
index ba892303e5..1763bb0e89 100644
--- a/ports/src/noux/ram_session_component.h
+++ b/ports/src/noux/ram_session_component.h
@@ -33,8 +33,6 @@
namespace Noux {
- using namespace Genode;
-
struct Ram_dataspace_info : Dataspace_info,
List::Element
{
@@ -57,19 +55,19 @@ namespace Noux {
void *src = 0;
try {
- src = Genode::env()->rm_session()->attach(ds_cap());
+ src = env()->rm_session()->attach(ds_cap());
} catch (...) { }
void *dst = 0;
try {
- dst = Genode::env()->rm_session()->attach(dst_ds);
+ dst = env()->rm_session()->attach(dst_ds);
} catch (...) { }
if (src && dst)
memcpy(dst, src, size);
- if (src) Genode::env()->rm_session()->detach(src);
- if (dst) Genode::env()->rm_session()->detach(dst);
+ if (src) env()->rm_session()->detach(src);
+ if (dst) env()->rm_session()->detach(dst);
if (!src || !dst) {
Ram_session_client(ram).free(dst_ds);
@@ -88,13 +86,13 @@ namespace Noux {
char *dst = 0;
try {
- dst = Genode::env()->rm_session()->attach(ds_cap());
+ dst = env()->rm_session()->attach(ds_cap());
} catch (...) { }
if (src && dst)
memcpy(dst + dst_offset, src, len);
- if (dst) Genode::env()->rm_session()->detach(dst);
+ if (dst) env()->rm_session()->detach(dst);
}
};
@@ -167,7 +165,7 @@ namespace Noux {
_used_quota -= ds_info->size();
env()->ram_session()->free(ds_cap);
- Genode::destroy(env()->heap(), ds_info);
+ destroy(env()->heap(), ds_info);
}
int ref_account(Ram_session_capability) { return 0; }
diff --git a/ports/src/noux/rm_session_component.h b/ports/src/noux/rm_session_component.h
index 3a35c75153..2683532123 100644
--- a/ports/src/noux/rm_session_component.h
+++ b/ports/src/noux/rm_session_component.h
@@ -24,8 +24,6 @@
namespace Noux {
- using namespace Genode;
-
class Rm_session_component : public Rpc_object
{
private:
@@ -207,7 +205,7 @@ namespace Noux {
* Record attachement for later replay (needed during
* fork)
*/
- _regions.insert(new (Genode::env()->heap())
+ _regions.insert(new (env()->heap())
Region(ds, size, offset, local_addr));
return local_addr;
}
@@ -224,7 +222,7 @@ namespace Noux {
}
_regions.remove(region);
- destroy(Genode::env()->heap(), region);
+ destroy(env()->heap(), region);
}
Pager_capability add_client(Thread_capability thread)
diff --git a/ports/src/noux/root_file_system.h b/ports/src/noux/root_file_system.h
index b48615d9a6..063f654fd9 100644
--- a/ports/src/noux/root_file_system.h
+++ b/ports/src/noux/root_file_system.h
@@ -27,7 +27,7 @@ namespace Noux {
{
private:
- Genode::Lock _lock;
+ Lock _lock;
public:
@@ -49,7 +49,7 @@ namespace Noux {
bool dirent(Sysio *sysio, char const *path)
{
- Genode::Lock::Guard guard(_lock);
+ Lock::Guard guard(_lock);
int const index = sysio->dirent_in.index;
if (index) {
@@ -58,8 +58,8 @@ namespace Noux {
}
sysio->dirent_out.entry.fileno = 13;
- Genode::strncpy(sysio->dirent_out.entry.name, "test",
- sizeof(sysio->dirent_out.entry.name));
+ strncpy(sysio->dirent_out.entry.name, "test",
+ sizeof(sysio->dirent_out.entry.name));
sysio->dirent_out.entry.type = Sysio::DIRENT_TYPE_DIRECTORY;
return true;
@@ -67,18 +67,18 @@ namespace Noux {
Vfs_handle *open(Sysio *sysio, char const *path)
{
- Genode::Lock::Guard guard(_lock);
+ Lock::Guard guard(_lock);
- if (Genode::strcmp(path, "/") == 0)
- return new (Genode::env()->heap()) Vfs_handle(this, this, 0);
+ if (strcmp(path, "/") == 0)
+ return new (env()->heap()) Vfs_handle(this, this, 0);
return 0;
}
void close(Vfs_handle *handle)
{
- Genode::Lock::Guard guard(_lock);
- Genode::destroy(Genode::env()->heap(), handle);
+ Lock::Guard guard(_lock);
+ destroy(env()->heap(), handle);
}
diff --git a/ports/src/noux/shared_pointer.h b/ports/src/noux/shared_pointer.h
index b94754ccab..4f4ec8e35f 100644
--- a/ports/src/noux/shared_pointer.h
+++ b/ports/src/noux/shared_pointer.h
@@ -32,14 +32,14 @@ namespace Noux {
{
private:
- Genode::Lock _lock;
- long _value;
+ Lock _lock;
+ long _value;
friend class Shared_pointer_base;
void _inc_ref_count()
{
- Genode::Lock::Guard guard(_lock);
+ Lock::Guard guard(_lock);
_value++;
}
@@ -48,7 +48,7 @@ namespace Noux {
*/
long _dec_ref_count()
{
- Genode::Lock::Guard guard(_lock);
+ Lock::Guard guard(_lock);
return --_value;
}
@@ -82,8 +82,8 @@ namespace Noux {
{
private:
- T *_ptr;
- Genode::Allocator *_alloc;
+ T *_ptr;
+ Allocator *_alloc;
void _dec_ref_count()
{
@@ -92,7 +92,7 @@ namespace Noux {
if (0)
PINF("ref count for %p reached zero -> delete object", _ptr);
- Genode::destroy(_alloc, _ptr);
+ destroy(_alloc, _ptr);
_ptr = 0;
_alloc = 0;
_ref_counter = 0;
@@ -103,7 +103,7 @@ namespace Noux {
Shared_pointer() : Shared_pointer_base(0), _ptr(0), _alloc(0) { }
- Shared_pointer(T *ptr, Genode::Allocator *alloc)
+ Shared_pointer(T *ptr, Allocator *alloc)
: Shared_pointer_base(ptr), _ptr(ptr), _alloc(alloc)
{
_inc_ref_count();
diff --git a/ports/src/noux/signal_dispatcher.h b/ports/src/noux/signal_dispatcher.h
index a11e4198fc..2985c1c98d 100644
--- a/ports/src/noux/signal_dispatcher.h
+++ b/ports/src/noux/signal_dispatcher.h
@@ -19,7 +19,7 @@
namespace Noux {
- struct Signal_dispatcher : public Genode::Signal_context
+ struct Signal_dispatcher : public Signal_context
{
virtual void dispatch() = 0;
};
diff --git a/ports/src/noux/tar_file_system.h b/ports/src/noux/tar_file_system.h
index be80738275..813dbac248 100644
--- a/ports/src/noux/tar_file_system.h
+++ b/ports/src/noux/tar_file_system.h
@@ -27,23 +27,22 @@ namespace Noux {
class Tar_file_system : public File_system
{
- Genode::Lock _lock;
+ Lock _lock;
struct Rom_name
{
enum { ROM_NAME_MAX_LEN = 64 };
char name[ROM_NAME_MAX_LEN];
- Rom_name(Genode::Xml_node config) {
+ Rom_name(Xml_node config) {
config.attribute("name").value(name, sizeof(name));
}
} _rom_name;
- Genode::Rom_connection _rom;
+ Rom_connection _rom;
-
- char *_tar_base;
- Genode::size_t _tar_size;
+ char *_tar_base;
+ size_t _tar_size;
class Record
{
@@ -70,10 +69,10 @@ namespace Noux {
* large enough to host an additional zero.
*/
char buf[sizeof(field) + 1];
- Genode::strncpy(buf, field, sizeof(buf));
+ strncpy(buf, field, sizeof(buf));
unsigned long value = 0;
- Genode::ascii_to(buf, &value, 8);
+ ascii_to(buf, &value, 8);
return value;
}
@@ -86,7 +85,7 @@ namespace Noux {
enum { TYPE_FILE = 0, TYPE_HARDLINK = 1,
TYPE_SYMLINK = 2, TYPE_DIR = 5 };
- Genode::size_t size() const { return _read(_size); }
+ size_t size() const { return _read(_size); }
unsigned uid() const { return _read(_uid); }
unsigned gid() const { return _read(_gid); }
unsigned mode() const { return _read(_mode); }
@@ -131,7 +130,6 @@ namespace Noux {
static void _remove_trailing_slashes(char *str)
{
- using namespace Genode;
size_t len = 0;
while ((len = strlen(str)) && (str[len - 1] == '/'))
str[len - 1] = 0;
@@ -207,7 +205,7 @@ namespace Noux {
if (criterion->match(record->name()))
return record;
- Genode::size_t file_size = record->size();
+ size_t file_size = record->size();
/* some datablocks */ /* one metablock */
block_id = block_id + (file_size / Record::BLOCK_LEN) + 1;
@@ -231,11 +229,11 @@ namespace Noux {
public:
- Tar_file_system(Genode::Xml_node config)
+ Tar_file_system(Xml_node config)
:
File_system(config), _rom_name(config), _rom(_rom_name.name),
- _tar_base(Genode::env()->rm_session()->attach(_rom.dataspace())),
- _tar_size(Genode::Dataspace_client(_rom.dataspace()).size())
+ _tar_base(env()->rm_session()->attach(_rom.dataspace())),
+ _tar_size(Dataspace_client(_rom.dataspace()).size())
{
PINF("tar archive '%s' local at %p, size is %zd",
_rom_name.name, _tar_base, _tar_size);
@@ -246,10 +244,8 @@ namespace Noux {
** Directory-service interface **
*********************************/
- Genode::Dataspace_capability dataspace(char const *path)
+ Dataspace_capability dataspace(char const *path)
{
- using namespace Genode;
-
/*
* Walk hardlinks until we reach a file
*/
@@ -288,7 +284,7 @@ namespace Noux {
return Dataspace_capability();
}
- void release(Genode::Dataspace_capability ds_cap)
+ void release(Dataspace_capability ds_cap)
{
env()->ram_session()->free(static_cap_cast(ds_cap));
}
@@ -321,7 +317,7 @@ namespace Noux {
bool dirent(Sysio *sysio, char const *path)
{
- Genode::Lock::Guard guard(_lock);
+ Lock::Guard guard(_lock);
int const index = sysio->dirent_in.index;
@@ -345,9 +341,9 @@ namespace Noux {
absolute_path.keep_only_last_element();
absolute_path.remove_trailing('/');
- Genode::strncpy(sysio->dirent_out.entry.name,
- absolute_path.base() + 1,
- sizeof(sysio->dirent_out.entry.name));
+ strncpy(sysio->dirent_out.entry.name,
+ absolute_path.base() + 1,
+ sizeof(sysio->dirent_out.entry.name));
PWRN("direntry in %s: %s", path, absolute_path.base() + 1);
return true;
@@ -355,14 +351,14 @@ namespace Noux {
Vfs_handle *open(Sysio *sysio, char const *path)
{
- Genode::Lock::Guard guard(_lock);
+ Lock::Guard guard(_lock);
PDBG("open %s", path);
Lookup_exact lookup_criterion(path);
Record *record = 0;
if ((record = _lookup(&lookup_criterion)))
- return new (Genode::env()->heap())
+ return new (env()->heap())
Tar_vfs_handle(this, 0, record);
sysio->error.open = Sysio::OPEN_ERR_UNACCESSIBLE;
@@ -371,8 +367,8 @@ namespace Noux {
void close(Vfs_handle *handle)
{
- Genode::Lock::Guard guard(_lock);
- Genode::destroy(Genode::env()->heap(), handle);
+ Lock::Guard guard(_lock);
+ destroy(env()->heap(), handle);
}
@@ -388,8 +384,6 @@ namespace Noux {
bool read(Sysio *sysio, Vfs_handle *vfs_handle)
{
- using namespace Genode;
-
Tar_vfs_handle const *handle = static_cast(vfs_handle);
size_t const record_size = handle->record()->size();
diff --git a/ports/src/noux/terminal_io_channel.h b/ports/src/noux/terminal_io_channel.h
index d25346c3c7..da6b9d4257 100644
--- a/ports/src/noux/terminal_io_channel.h
+++ b/ports/src/noux/terminal_io_channel.h
@@ -27,14 +27,14 @@ namespace Noux {
struct Terminal_io_channel : Io_channel, Signal_dispatcher
{
- Terminal::Session &terminal;
- Genode::Signal_receiver &sig_rec;
- bool eof;
+ Terminal::Session &terminal;
+ Signal_receiver &sig_rec;
+ bool eof;
enum Type { STDIN, STDOUT, STDERR } type;
Terminal_io_channel(Terminal::Session &terminal, Type type,
- Genode::Signal_receiver &sig_rec)
+ Signal_receiver &sig_rec)
: terminal(terminal), sig_rec(sig_rec), eof(false), type(type)
{
/*
@@ -76,9 +76,9 @@ namespace Noux {
return true;
}
- Genode::size_t const max_count =
- Genode::min(sysio->read_in.count,
- sizeof(sysio->read_out.chunk));
+ size_t const max_count =
+ min(sysio->read_in.count,
+ sizeof(sysio->read_out.chunk));
sysio->read_out.count =
terminal.read(sysio->read_out.chunk, max_count);
diff --git a/ports/src/noux/vfs.h b/ports/src/noux/vfs.h
index e722b4ab93..0993805a7f 100644
--- a/ports/src/noux/vfs.h
+++ b/ports/src/noux/vfs.h
@@ -31,23 +31,23 @@ namespace Noux {
{
private:
- Genode::List _file_systems;
+ List _file_systems;
public:
- Genode::Dataspace_capability dataspace_from_file(char const *filename)
+ Dataspace_capability dataspace_from_file(char const *filename)
{
for (File_system *fs = _file_systems.first(); fs; fs = fs->next()) {
char const *fs_local_path = fs->local_path(filename);
- Genode::Dataspace_capability ds_cap;
+ Dataspace_capability ds_cap;
if (fs_local_path && (ds_cap = fs->dataspace(fs_local_path)).valid())
return ds_cap;
}
- return Genode::Dataspace_capability();
+ return Dataspace_capability();
}
void release_dataspace_for_file(char const *filename,
- Genode::Dataspace_capability ds_cap)
+ Dataspace_capability ds_cap)
{
for (File_system *fs = _file_systems.first(); fs; fs = fs->next()) {
char const *fs_local_path = fs->local_path(filename);
diff --git a/ports/src/noux/vfs_handle.h b/ports/src/noux/vfs_handle.h
index 78e5ceb631..3fab73ae92 100644
--- a/ports/src/noux/vfs_handle.h
+++ b/ports/src/noux/vfs_handle.h
@@ -34,7 +34,7 @@ namespace Noux {
Directory_service *_ds;
File_io_service *_fs;
int _status_flags;
- Genode::size_t _seek;
+ size_t _seek;
friend class Vfs_io_channel; /* for modifying '_seek' */
@@ -45,13 +45,13 @@ namespace Noux {
static bool _msg(char const *sc) {
PERR("%s not supported by directory service", sc); return false; }
- Genode::Dataspace_capability dataspace(char const *)
+ Dataspace_capability dataspace(char const *)
{
_msg("dataspace");
- return Genode::Dataspace_capability();
+ return Dataspace_capability();
}
- void release(Genode::Dataspace_capability) { }
+ void release(Dataspace_capability) { }
bool stat(Sysio *, char const *) { return _msg("stat"); }
Vfs_handle *open(Sysio *, char const *) { _msg("open"); return 0; }
@@ -93,7 +93,7 @@ namespace Noux {
int status_flags() { return _status_flags; }
- Genode::size_t seek() const { return _seek; }
+ size_t seek() const { return _seek; }
};
}
diff --git a/ports/src/noux/vfs_io_channel.h b/ports/src/noux/vfs_io_channel.h
index 09c534f86a..2204468336 100644
--- a/ports/src/noux/vfs_io_channel.h
+++ b/ports/src/noux/vfs_io_channel.h
@@ -81,9 +81,9 @@ namespace Noux {
unsigned const index = sysio->dirent_in.index;
if (index < 2) {
sysio->dirent_out.entry.type = Sysio::DIRENT_TYPE_DIRECTORY;
- Genode::strncpy(sysio->dirent_out.entry.name,
- index ? ".." : ".",
- sizeof(sysio->dirent_out.entry.name));
+ strncpy(sysio->dirent_out.entry.name,
+ index ? ".." : ".",
+ sizeof(sysio->dirent_out.entry.name));
sysio->dirent_out.entry.fileno = 1;
return true;
diff --git a/ports/src/noux/wake_up_notifier.h b/ports/src/noux/wake_up_notifier.h
index 3c46c3d5b1..c32780fd09 100644
--- a/ports/src/noux/wake_up_notifier.h
+++ b/ports/src/noux/wake_up_notifier.h
@@ -20,11 +20,11 @@
namespace Noux {
- struct Wake_up_notifier : Genode::List::Element
+ struct Wake_up_notifier : List::Element
{
- Genode::Semaphore *semaphore;
+ Semaphore *semaphore;
- Wake_up_notifier(Genode::Semaphore *semaphore = 0)
+ Wake_up_notifier(Semaphore *semaphore = 0)
: semaphore(semaphore) { }
void wake_up()