26namespace L4Re {
namespace Core {
28Ro_file::~Ro_file() noexcept
33 L4Re::virt_cap_alloc->release(_ds);
37Ro_file::fstat64(
struct stat64 *buf)
const noexcept
41 memset(buf, 0,
sizeof(*buf));
43 buf->st_mode = S_IFREG | 0644;
44 buf->st_dev = _ds.cap();
52Ro_file::read_single(
const struct iovec *vec, off64_t pos)
noexcept
54 off64_t l = vec->iov_len;
60 Vfs_config::memcpy(vec->iov_base, _addr + pos, l);
68Ro_file::preadv(
const struct iovec *vec,
int cnt, off64_t offset)
noexcept
72 void const *file =
reinterpret_cast<void*
>(
L4_PAGESIZE);
80 _addr =
static_cast<char const *
>(file);
87 ssize_t r = read_single(vec, offset);
91 if (
static_cast<size_t>(r) < vec->iov_len)
101Ro_file::pwritev(
const struct iovec *,
int, off64_t)
noexcept
107Ro_file::ioctl(
unsigned long v, va_list args)
noexcept
112 int *available = va_arg(args,
int *);
113 *available = _size - pos();
static Env const * env() noexcept
Returns the initial environment for the current task.
L4::Cap< Rm > rm() const noexcept
Object-capability to the region map.
unsigned long l4_addr_t
Address type.
l4_addr_t l4_round_page(l4_addr_t address) L4_NOTHROW
Round address up to the next page.
#define L4_PAGESIZE
Minimal page size (in bytes).
@ Search_addr
Search for a suitable address range.