L4Re Operating System Framework
Interface and Usage Documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
vfs.h
1/*
2 * (c) 2010 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
3 * Alexander Warg <warg@os.inf.tu-dresden.de>
4 * economic rights: Technische Universität Dresden (Germany)
5 *
6 * License: see LICENSE.spdx (in this directory or the directories above)
7 */
8#pragma once
9
10#include <l4/sys/compiler.h>
11
12#include <unistd.h>
13#include <stdarg.h>
14#include <fcntl.h>
15#include <sys/stat.h>
16#include <sys/mman.h>
17#include <sys/socket.h>
18#include <utime.h>
19#include <errno.h>
20
21#ifndef AT_FDCWD
22# define AT_FDCWD -100
23#endif
24
25#ifdef __cplusplus
26
27#include <l4/sys/capability>
28#include <l4/re/cap_alloc>
29#include <l4/re/dataspace>
30#include <l4/cxx/pair>
31#include <l4/cxx/ref_ptr>
32
33namespace L4Re {
37namespace Vfs {
38
39class Mount_tree;
40class File;
41
52{
53public:
59 enum Ready_type : unsigned
60 {
61 Read = 0,
62 Write,
63 Exception
64 };
65
66 virtual ~Generic_file() noexcept = 0;
67
79 virtual int unlock_all_locks() noexcept = 0;
80
89 virtual int fstat64(struct stat64 *buf) const noexcept = 0;
90
96 virtual int fchmod(mode_t) noexcept = 0;
97
107 virtual int get_status_flags() const noexcept = 0;
108
124 virtual int set_status_flags(long flags) noexcept = 0;
125
126 virtual int utime(const struct utimbuf *) noexcept = 0;
127 virtual int utimes(const struct timeval [2]) noexcept = 0;
128 virtual ssize_t readlink(char *, size_t) = 0;
129
145 virtual bool check_ready(Ready_type rt) noexcept = 0;
146};
147
148inline
149Generic_file::~Generic_file() noexcept
150{}
151
160{
161public:
162 virtual ~Directory() noexcept = 0;
163
177 virtual int faccessat(const char *path, int mode, int flags) noexcept = 0;
178
191 virtual int mkdir(const char *path, mode_t mode) noexcept = 0;
192
203 virtual int unlink(const char *path) noexcept = 0;
204
218 virtual int rename(const char *src_path, const char *dst_path) noexcept = 0;
219
233 virtual int link(const char *src_path, const char *dst_path) noexcept = 0;
234
247 virtual int symlink(const char *src_path, const char *dst_path) noexcept = 0;
248
259 virtual int rmdir(const char *path) noexcept = 0;
260 virtual int openat(const char *path, int flags, mode_t mode,
261 cxx::Ref_ptr<File> *f) noexcept = 0;
262
263 virtual ssize_t getdents(char *buf, size_t sizebytes) noexcept = 0;
264
265 virtual int fchmodat(const char *pathname,
266 mode_t mode, int flags) noexcept = 0;
267
268 virtual int utimensat(const char *pathname,
269 const struct timespec times[2], int flags) noexcept = 0;
270
274 virtual int get_entry(const char *, int, mode_t, cxx::Ref_ptr<File> *) noexcept = 0;
275};
276
277inline
278Directory::~Directory() noexcept
279{}
280
287{
288public:
289 virtual ~Regular_file() noexcept = 0;
290
301 virtual L4::Cap<L4Re::Dataspace> data_space() noexcept = 0;
302
312 virtual ssize_t readv(const struct iovec*, int iovcnt) noexcept = 0;
313
324 virtual ssize_t writev(const struct iovec*, int iovcnt) noexcept = 0;
325
326 virtual ssize_t preadv(const struct iovec *iov, int iovcnt, off64_t offset) noexcept = 0;
327 virtual ssize_t pwritev(const struct iovec *iov, int iovcnt, off64_t offset) noexcept = 0;
328
336 virtual off64_t lseek64(off64_t, int) noexcept = 0;
337
338
346 virtual int ftruncate64(off64_t pos) noexcept = 0;
347
353 virtual int fsync() const noexcept = 0;
354
360 virtual int fdatasync() const noexcept = 0;
361
371 virtual int get_lock(struct flock64 *lock) noexcept = 0;
372
381 virtual int set_lock(struct flock64 *lock, bool wait) noexcept = 0;
382};
383
384inline
385Regular_file::~Regular_file() noexcept
386{}
387
388class Socket
389{
390public:
391 virtual ~Socket() noexcept = 0;
392 virtual int bind(sockaddr const *, socklen_t) noexcept = 0;
393 virtual int connect(sockaddr const *, socklen_t) noexcept = 0;
394 virtual ssize_t send(void const *, size_t, int) noexcept = 0;
395 virtual ssize_t recv(void *, size_t, int) noexcept = 0;
396 virtual ssize_t sendto(void const *, size_t, int, sockaddr const *, socklen_t) noexcept = 0;
397 virtual ssize_t recvfrom(void *, size_t, int, sockaddr *, socklen_t *) noexcept = 0;
398 virtual ssize_t sendmsg(msghdr const *, int) noexcept = 0;
399 virtual ssize_t recvmsg(msghdr *, int) noexcept = 0;
400 virtual int getsockopt(int level, int opt, void *, socklen_t *) noexcept = 0;
401 virtual int setsockopt(int level, int opt, void const *, socklen_t) noexcept = 0;
402 virtual int listen(int) noexcept = 0;
403 virtual int accept(sockaddr *addr, socklen_t *) noexcept = 0;
404 virtual int shutdown(int) noexcept = 0;
405
406 virtual int getsockname(sockaddr *, socklen_t *) noexcept = 0;
407 virtual int getpeername(sockaddr *, socklen_t *) noexcept = 0;
408};
409
410inline
411Socket::~Socket() noexcept
412{}
413
420{
421public:
422 virtual ~Special_file() noexcept = 0;
423
434 virtual int ioctl(unsigned long cmd, va_list args) noexcept = 0;
435};
436
437inline
438Special_file::~Special_file() noexcept
439{}
440
454class File :
455 public Generic_file,
456 public Regular_file,
457 public Directory,
458 public Special_file,
459 public Socket
460{
461 friend class Mount_tree;
462
463private:
464 void operator = (File const &);
465
466protected:
467 File() noexcept : _ref_cnt(0) {}
468 File(File const &)
469 : Generic_file(),Regular_file(), Directory(), Special_file(), _ref_cnt(0)
470 {}
471
472public:
473
474 const char *get_mount(const char *path, cxx::Ref_ptr<File> *dir,
475 cxx::Ref_ptr<Mount_tree> *mt = 0) noexcept;
476
477 int openat(const char *path, int flags, mode_t mode,
478 cxx::Ref_ptr<File> *f) noexcept override;
479
480 void add_ref() noexcept { ++_ref_cnt; }
481 int remove_ref() noexcept { return --_ref_cnt; }
482
483 virtual ~File() noexcept = 0;
484
485 cxx::Ref_ptr<Mount_tree> mount_tree() const noexcept
486 { return _mount_tree; }
487
488 char const *path() const noexcept { return _path; }
489
490private:
491 int _ref_cnt;
492 cxx::Ref_ptr<Mount_tree> _mount_tree;
493 char _path[80] = "";
494};
495
496inline
497File::~File() noexcept
498{}
499
500class Path
501{
502private:
503 char const *_p;
504 unsigned _l;
505
506public:
507 Path() noexcept : _p(0), _l(0) {}
508
509 explicit Path(char const *p) noexcept : _p(p)
510 { for (_l = 0; *p; ++p, ++_l) ; }
511
512 Path(char const *p, unsigned l) noexcept : _p(p), _l(l)
513 {}
514
515 static bool __is_sep(char s) noexcept;
516
517 Path cmp_path(char const *prefix) const noexcept;
518
519 struct Invalid_ptr;
520 operator Invalid_ptr const * () const
521 { return reinterpret_cast<Invalid_ptr const *>(_p); }
522
523 unsigned length() const { return _l; }
524 char const *path() const { return _p; }
525
526 bool empty() const { return _l == 0; }
527
528 bool is_sep(unsigned offset) const { return __is_sep(_p[offset]); }
529
530 bool strip_sep()
531 {
532 bool s = false;
533 for (; __is_sep(*_p) && _l; ++_p, --_l)
534 s = true;
535 return s;
536 }
537
538 Path first() const
539 {
540 unsigned i;
541 for (i = 0; i < _l && !is_sep(i); ++i)
542 ;
543
544 return Path(_p, i);
545 }
546
547 Path strip_first()
548 {
549 Path r = first();
550 _p += r.length();
551 _l -= r.length();
552 strip_sep();
553 return r;
554 }
555
556};
557
558
565class Mount_tree
566{
567public:
568
569 explicit Mount_tree(char *n) noexcept;
570
571 Path lookup(Path const &path, cxx::Ref_ptr<Mount_tree> *mt,
572 cxx::Ref_ptr<Mount_tree> *mp = 0) noexcept;
573
574 Path find(Path const &p, cxx::Ref_ptr<Mount_tree> *t) noexcept;
575
576 cxx::Ref_ptr<File> mount() const
577 { return _mount; }
578
579 void mount(cxx::Ref_ptr<File> const &m)
580 {
581 m->_mount_tree = cxx::ref_ptr(this);
582 _mount = m;
583 }
584
585 static int create_tree(cxx::Ref_ptr<Mount_tree> const &root,
586 char const *path,
587 cxx::Ref_ptr<File> const &dir) noexcept;
588
589 void add_child_node(cxx::Ref_ptr<Mount_tree> const &cld);
590
591 virtual ~Mount_tree() noexcept = 0;
592
593 void add_ref() noexcept { ++_ref_cnt; }
594 int remove_ref() noexcept { return --_ref_cnt; }
595
596private:
597 friend class Real_mount_tree;
598
599 int _ref_cnt;
600 char *_name;
603 cxx::Ref_ptr<File> _mount;
604};
605
606inline
607Mount_tree::~Mount_tree() noexcept
608{}
609
610inline bool
611Path::__is_sep(char s) noexcept
612{ return s == '/'; }
613
614inline Path
615Path::cmp_path(char const *n) const noexcept
616{
617 char const *p = _p;
618 for (; *p && !__is_sep(*p) && *n; ++p, ++n)
619 if (*p != *n)
620 return Path();
621
622 if (*n || (*p && !__is_sep(*p)))
623 return Path();
624
625 return Path(p, _l - (p - _p));
626}
627
628inline
629Mount_tree::Mount_tree(char *n) noexcept
630: _ref_cnt(0), _name(n)
631{}
632
633inline Path
634Mount_tree::find(Path const &p, cxx::Ref_ptr<Mount_tree> *t) noexcept
635{
636 if (!_cld)
637 return Path();
638
639 for (cxx::Ref_ptr<Mount_tree> x = _cld; x; x = x->_sib)
640 {
641 Path const r = p.cmp_path(x->_name);
642 if (r)
643 {
644 *t = x;
645 return r;
646 }
647 }
648
649 return Path();
650}
651
652inline Path
653Mount_tree::lookup(Path const &path, cxx::Ref_ptr<Mount_tree> *mt,
654 cxx::Ref_ptr<Mount_tree> *mp) noexcept
655{
657 Path p = path;
658
659 if (p.first().cmp_path("."))
660 p.strip_first();
661
662 Path last_mp = p;
663
664 if (mp)
665 *mp = x;;
666
667 while (1)
668 {
669 Path r = x->find(p, &x);
670
671 if (!r)
672 {
673 if (mp)
674 return last_mp;
675
676 if (mt)
677 *mt = x;
678
679 return p;
680 }
681
682 r.strip_sep();
683
684 if (mp && x->_mount)
685 {
686 last_mp = r;
687 *mp = x;
688 }
689
690 if (r.empty())
691 {
692 if (mt)
693 *mt = x;
694
695 if (mp)
696 return last_mp;
697 else
698 return r;
699 }
700
701 p = r;
702 }
703}
704
705inline
706void
707Mount_tree::add_child_node(cxx::Ref_ptr<Mount_tree> const &cld)
708{
709 cld->_sib = _cld;
710 _cld = cld;
711}
712
713inline
714const char *
715File::get_mount(const char *path, cxx::Ref_ptr<File> *dir,
716 cxx::Ref_ptr<Mount_tree> *mt) noexcept
717{
718 if (!_mount_tree)
719 {
720 *dir = cxx::ref_ptr(this);
721 return path;
722 }
723
725 Path p = _mount_tree->lookup(Path(path), mt, &mp);
726 if (mp->mount())
727 {
728 *dir = mp->mount();
729 return p.path();
730 }
731 else
732 {
733 *dir = cxx::ref_ptr(this);
734 return path;
735 }
736}
737
738inline int
739File::openat(const char *path, int flags, mode_t mode,
740 cxx::Ref_ptr<File> *f) noexcept
741{
744 char const *m_path = get_mount(path, &dir, &mt);
745
746 int res = dir->get_entry(m_path, flags, mode, f);
747
748 if (res < 0)
749 return res;
750
751 if (!(*f)->_mount_tree && mt)
752 (*f)->_mount_tree = mt;
753
754 // Debugging {
755 size_t i = 0;
756 for (; i < sizeof((*f)->_path) - 1 && path[i]; ++i)
757 (*f)->_path[i] = path[i];
758 (*f)->_path[i] = '\0';
759 // } Debugging
760
761 return res;
762}
763
772class Mman
773{
774public:
776 virtual int mmap2(void *start, size_t len, int prot, int flags, int fd,
777 off_t offset, void **ptr) noexcept = 0;
778
780 virtual int munmap(void *start, size_t len) noexcept = 0;
781
783 virtual int mremap(void *old, size_t old_sz, size_t new_sz, int flags,
784 void **new_addr) noexcept = 0;
785
787 virtual int mprotect(const void *a, size_t sz, int prot) noexcept = 0;
788
790 virtual int msync(void *addr, size_t len, int flags) noexcept = 0;
791
793 virtual int madvise(void *addr, size_t len, int advice) noexcept = 0;
794
795 virtual ~Mman() noexcept = 0;
796};
797
798inline
799Mman::~Mman() noexcept {}
800
801class File_factory
802{
803private:
804 int _ref_cnt = 0;
805 int _proto = 0;
806 char const *_proto_name = 0;
807
808 template<typename T> friend struct cxx::Default_ref_counter;
809 void add_ref() noexcept { ++_ref_cnt; }
810 int remove_ref() noexcept { return --_ref_cnt; }
811
812public:
813 explicit File_factory(int proto) : _proto(proto) {}
814 explicit File_factory(char const *proto_name) : _proto_name(proto_name) {}
815 File_factory(int proto, char const *proto_name)
816 : _proto(proto), _proto_name(proto_name)
817 {}
818
819 File_factory(File_factory const &) = delete;
820 File_factory &operator = (File_factory const &) = delete;
821
822 char const *proto_name() const { return _proto_name; }
823 int proto() const { return _proto; }
824
825 virtual ~File_factory() noexcept = 0;
826 virtual cxx::Ref_ptr<File> create(L4::Cap<void> file) = 0;
827};
828
829inline File_factory::~File_factory() noexcept {}
830
831template<typename IFACE, typename IMPL>
832class File_factory_t : public File_factory
833{
834public:
835 File_factory_t()
836 : File_factory(IFACE::Protocol, L4::kobject_typeid<IFACE>()->name())
837 {}
838
839 cxx::Ref_ptr<File> create(L4::Cap<void> file) override
840 { return cxx::make_ref_obj<IMPL>(L4::cap_cast<IFACE>(file)); }
841};
842
857{
858protected:
859 File_system *_next;
860
861public:
862 File_system() noexcept : _next(0) {}
868 virtual char const *type() const noexcept = 0;
869
886 virtual int mount(char const *source, unsigned long mountflags,
887 void const *data, cxx::Ref_ptr<File> *dir) noexcept = 0;
888
889 virtual ~File_system() noexcept = 0;
890
895 File_system *next() const noexcept { return _next; }
896 File_system *&next() noexcept { return _next; }
897 void next(File_system *n) noexcept { _next = n; }
898};
899
900inline
901File_system::~File_system() noexcept
902{}
903
904class File_system_list
905{
906public:
907 class Iterator
908 {
909 public:
910 explicit constexpr Iterator(File_system *c = nullptr) : _c(c) {}
911
912 Iterator &operator++()
913 {
914 if (_c)
915 _c = _c->next();
916 return *this;
917 }
918
919 bool operator==(Iterator const &other) const { return _c == other._c; }
920 bool operator!=(Iterator const &other) const { return _c != other._c; }
921 File_system *operator*() const { return _c; }
922 File_system *operator->() const { return _c; }
923
924 private:
925 File_system *_c;
926 };
927
928 File_system_list(File_system *head) : _head(head) {}
929
930 constexpr Iterator begin() const
931 { return Iterator(_head); }
932
933 constexpr Iterator end() const
934 { return Iterator(); }
935
936private:
937 File_system *_head;
938};
939
945class Fs
946{
947public:
953 virtual cxx::Ref_ptr<File> get_file(int fd) noexcept = 0;
954
956 virtual cxx::Ref_ptr<File> get_root() noexcept = 0;
957
959 virtual cxx::Ref_ptr<File> get_cwd() noexcept { return get_root(); }
960
962 virtual void set_cwd(cxx::Ref_ptr<File> const &) noexcept {}
963
969 virtual int alloc_fd(cxx::Ref_ptr<File> const &f = cxx::Ref_ptr<>::Nil) noexcept = 0;
970
981 virtual cxx::Pair<cxx::Ref_ptr<File>, int>
982 set_fd(int fd, cxx::Ref_ptr<File> const &f = cxx::Ref_ptr<>::Nil) noexcept = 0;
983
989 virtual cxx::Ref_ptr<File> free_fd(int fd) noexcept = 0;
990
998 virtual int mount(char const *path, cxx::Ref_ptr<File> const &dir) noexcept = 0;
999
1007 virtual int register_file_system(File_system *f) noexcept = 0;
1008
1016 virtual int unregister_file_system(File_system *f) noexcept = 0;
1017
1025 virtual File_system *get_file_system(char const *fstype) noexcept = 0;
1026
1035 virtual File_system_list file_system_list() noexcept = 0;
1036
1040 int mount(char const *source, char const *target,
1041 char const *fstype, unsigned long mountflags,
1042 void const *data) noexcept;
1043
1044 virtual int register_file_factory(cxx::Ref_ptr<File_factory> f) noexcept = 0;
1045 virtual int unregister_file_factory(cxx::Ref_ptr<File_factory> f) noexcept = 0;
1046 virtual cxx::Ref_ptr<File_factory> get_file_factory(int proto) noexcept = 0;
1047 virtual cxx::Ref_ptr<File_factory> get_file_factory(char const *proto_name) noexcept = 0;
1048
1049 virtual ~Fs() = 0;
1050
1051private:
1052 int mount_one(char const *source, char const *target,
1053 File_system *fs, unsigned long mountflags,
1054 void const *data) noexcept;
1055};
1056
1057inline int
1058Fs::mount_one(char const *source, char const *target,
1059 File_system *fs, unsigned long mountflags,
1060 void const *data) noexcept
1061{
1063 int res = fs->mount(source, mountflags, data, &dir);
1064
1065 if (res < 0)
1066 return res;
1067
1068 return mount(target, dir);
1069}
1070
1071inline int
1072Fs::mount(char const *source, char const *target,
1073 char const *fstype, unsigned long mountflags,
1074 void const *data) noexcept
1075{
1076 if ( fstype[0] == 'a'
1077 && fstype[1] == 'u'
1078 && fstype[2] == 't'
1079 && fstype[3] == 'o'
1080 && fstype[4] == 0)
1081 {
1082 File_system_list fsl = file_system_list();
1083 for (File_system_list::Iterator c = fsl.begin(); c != fsl.end(); ++c)
1084 if (mount_one(source, target, *c, mountflags, data) == 0)
1085 return 0;
1086
1087 return -ENODEV;
1088 }
1089
1090 File_system *fs = get_file_system(fstype);
1091
1092 if (!fs)
1093 return -ENODEV;
1094
1095 return mount_one(source, target, fs, mountflags, data);
1096}
1097
1098inline
1099Fs::~Fs()
1100{}
1101
1108class Ops : public Mman, public Fs
1109{
1110public:
1111 virtual void *malloc(size_t bytes) noexcept = 0;
1112 virtual void free(void *mem) noexcept = 0;
1113 virtual ~Ops() noexcept = 0;
1114
1115 char *strndup(char const *str, unsigned l) noexcept
1116 {
1117 unsigned len;
1118 for (len = 0; str[len] && len < l; ++len)
1119 ;
1120
1121 if (len == 0)
1122 return nullptr;
1123
1124 ++len;
1125
1126 char *b = static_cast<char *>(this->malloc(len));
1127 if (b == nullptr)
1128 return nullptr;
1129
1130 char *r = b;
1131 for (; len - 1 > 0 && *str; --len, ++b, ++str)
1132 *b = *str;
1133
1134 *b = 0;
1135 return r;
1136 }
1137
1138};
1139
1140inline
1141Ops::~Ops() noexcept
1142{}
1143
1144}}
1145
1146#endif
1147
Abstract capability-allocator interface.
L4::Cap related definitions.
Interface for a POSIX file that is a directory.
Definition vfs.h:160
virtual int mkdir(const char *path, mode_t mode) noexcept=0
Create a new subdirectory.
virtual int link(const char *src_path, const char *dst_path) noexcept=0
Create a hard link (second name) for the given file.
virtual int unlink(const char *path) noexcept=0
Unlink the given file from that directory.
virtual int symlink(const char *src_path, const char *dst_path) noexcept=0
Create a symbolic link for the given file.
virtual int rmdir(const char *path) noexcept=0
Delete an empty directory.
virtual int rename(const char *src_path, const char *dst_path) noexcept=0
Rename the given file.
virtual int faccessat(const char *path, int mode, int flags) noexcept=0
Check access permissions on the given file.
Basic interface for an L4Re::Vfs file system.
Definition vfs.h:857
virtual char const * type() const noexcept=0
Returns the type of the file system used in mount as fstype argument.
The basic interface for an open POSIX file.
Definition vfs.h:460
POSIX File-system related functionality.
Definition vfs.h:946
virtual void set_cwd(cxx::Ref_ptr< File > const &) noexcept
Set the current working directory for the application.
Definition vfs.h:962
virtual int mount(char const *path, cxx::Ref_ptr< File > const &dir) noexcept=0
Mount a given file object at the given global path in the VFS.
virtual cxx::Ref_ptr< File > get_file(int fd) noexcept=0
Get the L4Re::Vfs::File for the file descriptor fd.
virtual cxx::Ref_ptr< File > free_fd(int fd) noexcept=0
Free the file descriptor fd.
virtual cxx::Pair< cxx::Ref_ptr< File >, int > set_fd(int fd, cxx::Ref_ptr< File > const &f=cxx::Ref_ptr<>::Nil) noexcept=0
Set the file object referenced by the file descriptor fd.
virtual int alloc_fd(cxx::Ref_ptr< File > const &f=cxx::Ref_ptr<>::Nil) noexcept=0
Allocate the next free file descriptor.
virtual cxx::Ref_ptr< File > get_root() noexcept=0
Get the directory object for the application's root directory.
The common interface for an open POSIX file.
Definition vfs.h:52
virtual int unlock_all_locks() noexcept=0
Unlock all locks on the file.
virtual int fchmod(mode_t) noexcept=0
Change POSIX access rights on the file.
virtual int fstat64(struct stat64 *buf) const noexcept=0
Get status information for the file.
virtual int set_status_flags(long flags) noexcept=0
Set file status flags (fcntl F_SETFL).
Ready_type
Type of I/O operation/condition a file can indicate readiness.
Definition vfs.h:60
virtual bool check_ready(Ready_type rt) noexcept=0
Check whether the file is ready for an I/O operation/condition.
virtual int get_status_flags() const noexcept=0
Get file status flags (fcntl F_GETFL).
Interface for POSIX memory management.
Definition vfs.h:773
virtual int mmap2(void *start, size_t len, int prot, int flags, int fd, off_t offset, void **ptr) noexcept=0
Backend for the mmap2 system call.
virtual int msync(void *addr, size_t len, int flags) noexcept=0
Backend for the msync system call.
virtual int munmap(void *start, size_t len) noexcept=0
Backend for the munmap system call.
virtual int mremap(void *old, size_t old_sz, size_t new_sz, int flags, void **new_addr) noexcept=0
Backend for the mremap system call.
virtual int madvise(void *addr, size_t len, int advice) noexcept=0
Backend for the madvice system call.
virtual int mprotect(const void *a, size_t sz, int prot) noexcept=0
Backend for the mprotect system call.
Interface for the POSIX backends of an application.
Definition vfs.h:1109
Interface for a POSIX file that provides regular file semantics.
Definition vfs.h:287
virtual L4::Cap< L4Re::Dataspace > data_space() noexcept=0
Get an L4Re::Dataspace object for the file.
Interface for a POSIX file that provides special file semantics.
Definition vfs.h:420
virtual int ioctl(unsigned long cmd, va_list args) noexcept=0
The famous IO control.
C++ interface for capabilities.
Definition capability.h:224
A reference-counting pointer with automatic cleanup.
Definition ref_ptr:71
L4 compiler related defines.
Dataspace interface.
Type_info const * kobject_typeid() noexcept
Get the L4::Type_info for the L4Re interface given in T.
Definition __typeinfo.h:682
L4Re C++ Interfaces.
Definition cmd_control:14
L4 low-level kernel interface.
Our C++ library.
Definition arith:11
Pair implementation.
Pair of two values.
Definition pair:28