15namespace L4Re {
namespace Core {
17Ro_file::~Ro_file() noexcept
22 L4Re::virt_cap_alloc->release(_ds);
26Ro_file::fstat64(
struct stat64 *buf)
const noexcept
30 memset(buf, 0,
sizeof(*buf));
32 buf->st_mode = S_IFREG | 0644;
33 buf->st_dev = _ds.cap();
41Ro_file::read_single(
const struct iovec *vec, off64_t pos)
noexcept
43 off64_t l = vec->iov_len;
49 Vfs_config::memcpy(vec->iov_base, _addr + pos, l);
57Ro_file::preadv(
const struct iovec *vec,
int cnt, off64_t offset)
noexcept
61 void const *file =
reinterpret_cast<void*
>(
L4_PAGESIZE);
69 _addr =
static_cast<char const *
>(file);
76 ssize_t r = read_single(vec, offset);
80 if (
static_cast<size_t>(r) < vec->iov_len)
90Ro_file::pwritev(
const struct iovec *,
int, off64_t)
noexcept
96Ro_file::ioctl(
unsigned long v, va_list args)
noexcept
101 int *available = va_arg(args,
int *);
102 *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.