2 * (c) 2010 Technische Universität Dresden
3 * This file is part of TUD:OS and distributed under the terms of the
4 * GNU General Public License 2.
5 * Please see the COPYING-GPL-2 file for details.
7 * As a special exception, you may use this file as part of a free software
8 * library without restriction. Specifically, if other files instantiate
9 * templates or use macros or inline functions from this file, or you compile
10 * this file and link it with other files to produce an executable, this
11 * file does not by itself cause the resulting executable to be covered by
12 * the GNU General Public License. This exception does not however
13 * invalidate any other reasons why the executable file might be covered by
14 * the GNU General Public License.
18 #include <l4/l4re_vfs/backend>
19 #include "simple_store.h"
21 namespace L4Re { namespace Core {
23 class Ro_file : public L4Re::Vfs::Be_file
26 L4::Cap<L4Re::Dataspace> _ds;
32 explicit Ro_file(L4::Cap<L4Re::Dataspace> ds) throw()
33 : Be_file(), _ds(ds), _f_pos(0), _addr(0)
39 L4::Cap<L4Re::Dataspace> data_space() const throw() { return _ds; }
41 ssize_t readv(const struct iovec*, int iovcnt) throw();
42 ssize_t writev(const struct iovec*, int iovcnt) throw();
44 off64_t lseek64(off64_t, int) throw();
45 int fstat64(struct stat64 *buf) const throw();
47 int ioctl(unsigned long, va_list) throw();
49 int get_status_flags() const throw()
52 int set_status_flags(long) throw()
57 void *operator new(size_t s) throw();
58 void operator delete(void *b) throw();
62 ssize_t read(const struct iovec*) throw();
63 // ssize_t write(const struct iovec*) throw();
68 static Simple_store<Ro_file> store;