Guarded interface to the VFS used by user applications. More...
#include <syscall/guarded_vfs.h>
Inheritance diagram for GuardedVFS:
Collaboration diagram for GuardedVFS:Static Public Member Functions | |
| static int | mount (const char *fstype, BlockDevice *bdev, const void *data) |
| Siehe man 2 mount. More... | |
| static int | umount () |
| Siehe man 2 umount. More... | |
| static void | sync () |
| Schreibt Änderungen im Puffer auf die Festplatte. Siehe man 2 sync. More... | |
| static int | open (const char *pathname, int flags) |
| Öffnet und erstellt (je nach flags) Dateien. Siehe man 2 open. More... | |
| static int | close (int fd) |
| Schließt einen Dateideskriptor. Siehe man 2 close. More... | |
| static ssize_t | read (int fd, void *buf, size_t count) |
Lesen von einem Dateideskriptor fd in Speicher buf der Länge count. Siehe man 2 read. More... | |
| static ssize_t | write (int fd, const void *buf, size_t count) |
Schreiben von Daten aus Speicher buf der Länge count an Dateideskriptor fd. Siehe man 2 write. More... | |
| static off_t | lseek (int fd, off_t offset, int whence) |
Ändert den aktuellen offset für Dateideskriptor fd. Siehe man 2 lseek. More... | |
| static int | truncate (const char *path, off_t length) |
Setzt die Länge der Datei an path auf length. Siehe man 2 truncate. More... | |
| static int | ftruncate (int fd, off_t length) |
Kürzt Datei für Dateideskriptor fd auf Länge length. Siehe man 2 ftruncate. More... | |
| static int | link (const char *oldpath, const char *newpath) |
Neuer Name newpath für Datei oldpath. Siehe man 2 link. More... | |
| static int | symlink (const char *target, const char *linkpath) |
| Erstellt einen symbolischen Verweis mit Inhalt target. Siehe man 2 symlink. More... | |
| static int | unlink (const char *pathname) |
Löscht Namen und bei keinem verbleibenden Verweis mehr die Datei pathname. Siehe man 2 unlink. More... | |
| static int | rmdir (const char *pathname) |
Löscht Verzeichnis pathname. Siehe man 2 rmdir. More... | |
| static int | rename (const char *oldpath, const char *newpath) |
| Verschieben von Dateien/Verzeichnissen. Siehe man 2 rename. More... | |
| static int | stat (const char *pathname, struct stat *statbuf) |
Liefert Dateistatus für pathname. Siehe man 2 stat. More... | |
| static int | lstat (const char *pathname, struct stat *statbuf) |
Liefert Dateistatus für pathname. Siehe man 2 lstat. More... | |
| static int | fstat (int fd, struct stat *statbuf) |
Liefert Dateistatus für Dateideskriptor fd. Siehe man 2 fstat. More... | |
| static ssize_t | readlink (const char *pathname, char *buf, size_t bufsiz) |
| Liest den Inhalt eines symbolischen Verweises. Siehe man 2 readlink. More... | |
| static int | getdents (int fd, Dirent *dirp, int count) |
| Liefert Verzeichniseinträge. Siehe man 2 getdents. More... | |
| static DIR * | opendir (const char *name) |
Öffnet ein Verzeichnis name. Siehe man 3 opendir. More... | |
| static struct Dirent * | readdir (DIR *dirp) |
| Liest einen Verzeichniseintrag. Siehe man 3 readdir. More... | |
| static void | rewinddir (DIR *dirp) |
| Setzt die Position im Verzeichnis zurück. Siehe man 3 rewinddir. More... | |
| static int | closedir (DIR *dirp) |
| Schließt ein Verzeichnis. Siehe man 3 closedir. More... | |
| static int | mkdir (const char *pathname) |
Erstellt Verzeichnis pathname. Siehe man 2 mkdir. More... | |
| static int | chdir (const char *path) |
Wechselt in Verzeichnis path. Siehe man 2 chdir. More... | |
| static int | fchdir (int fd) |
Wechselt in Verzeichnis fd. Siehe man 2 fchdir. More... | |
Static Public Member Functions inherited from VFS | |
| static int | mount (const char *fstype, BlockDevice *bdev, const void *data) |
| Siehe man 2 mount. More... | |
| static int | umount () |
| Siehe man 2 umount. More... | |
| static void | sync () |
| Schreibt Änderungen im Puffer auf die Festplatte. Siehe man 2 sync. More... | |
| static int | open (const char *pathname, int flags) |
| Öffnet und erstellt (je nach flags) Dateien. Siehe man 2 open. More... | |
| static int | close (int fd) |
| Schließt einen Dateideskriptor. Siehe man 2 close. More... | |
| static ssize_t | read (int fd, void *buf, size_t count) |
Lesen von einem Dateideskriptor fd in Speicher buf der Länge count. Siehe man 2 read. | |
| static ssize_t | write (int fd, const void *buf, size_t count) |
Schreiben von Daten aus Speicher buf der Länge count an Dateideskriptor fd. Siehe man 2 write. | |
| static off_t | lseek (int fd, off_t offset, int whence) |
Ändert den aktuellen offset für Dateideskriptor fd. Siehe man 2 lseek. More... | |
| static int | truncate (const char *path, off_t length) |
Setzt die Länge der Datei an path auf length. Siehe man 2 truncate. | |
| static int | ftruncate (int fd, off_t length) |
Kürzt Datei für Dateideskriptor fd auf Länge length. Siehe man 2 ftruncate. | |
| static int | link (const char *oldpath, const char *newpath) |
Neuer Name newpath für Datei oldpath. Siehe man 2 link. More... | |
| static int | symlink (const char *target, const char *linkpath) |
| Erstellt einen symbolischen Verweis mit Inhalt target. Siehe man 2 symlink. | |
| static int | unlink (const char *pathname) |
Löscht Namen und bei keinem verbleibenden Verweis mehr die Datei pathname. Siehe man 2 unlink. | |
| static int | rmdir (const char *pathname) |
Löscht Verzeichnis pathname. Siehe man 2 rmdir. | |
| static int | rename (const char *oldpath, const char *newpath) |
| Verschieben von Dateien/Verzeichnissen. Siehe man 2 rename. | |
| static int | stat (const char *pathname, struct stat *statbuf) |
Liefert Dateistatus für pathname. Siehe man 2 stat. More... | |
| static int | lstat (const char *pathname, struct stat *statbuf) |
Liefert Dateistatus für pathname. Siehe man 2 lstat. More... | |
| static int | fstat (int fd, struct stat *statbuf) |
Liefert Dateistatus für Dateideskriptor fd. Siehe man 2 fstat. More... | |
| static ssize_t | readlink (const char *pathname, char *buf, size_t bufsiz) |
| Liest den Inhalt eines symbolischen Verweises. Siehe man 2 readlink. More... | |
| static int | getdents (int fd, Dirent *dirp, int count) |
| Liefert Verzeichniseinträge. Siehe man 2 getdents. More... | |
| static DIR * | opendir (const char *name) |
Öffnet ein Verzeichnis name. Siehe man 3 opendir. | |
| static struct Dirent * | readdir (DIR *dirp) |
| Liest einen Verzeichniseintrag. Siehe man 3 readdir. | |
| static void | rewinddir (DIR *dirp) |
| Setzt die Position im Verzeichnis zurück. Siehe man 3 rewinddir. | |
| static int | closedir (DIR *dirp) |
| Schließt ein Verzeichnis. Siehe man 3 closedir. | |
| static int | mkdir (const char *pathname) |
Erstellt Verzeichnis pathname. Siehe man 2 mkdir. More... | |
| static int | chdir (const char *path) |
Wechselt in Verzeichnis path. Siehe man 2 chdir. | |
| static int | fchdir (int fd) |
Wechselt in Verzeichnis fd. Siehe man 2 fchdir. | |
Detailed Description
Guarded interface to the VFS used by user applications.
Implements the system call interface for class VFS. All methods provided by this class are wrappers for the respective method from the base class, which provide additional synchronization by using the class Guarded.
Member Function Documentation
|
inlinestatic |
Siehe man 2 mount.
Limitierungen: -target (siehe manpage) ist immer "/". -es werden keine Flags unterstützt -an Stelle des source Strings wird ein BlockDevice übergeben
|
inlinestatic |
Siehe man 2 umount.
Gibt -EBUSY zurück, falls das Dateisystem noch verwendet wird (offene Dateien). Limitierungen: -target (siehe manpage) ist immer "/".
|
inlinestatic |
|
inlinestatic |
Öffnet und erstellt (je nach flags) Dateien. Siehe man 2 open.
Limitierungen: -mode ist immer 0777 -unterstützte Flags sind: O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_EXCL
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Ändert den aktuellen offset für Dateideskriptor fd. Siehe man 2 lseek.
Unterstützt kein SEEK_DATA oder SEEK_HOLE. (Mit lseek(fd, 0, SEEK_END) lässt sich die Größe einer Datei herausfinden.)
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Neuer Name newpath für Datei oldpath. Siehe man 2 link.
Falls oldpath ein Symlink ist wird ein Hardlink auf den Symlink erstellt, nicht auf die Datei auf die der Symlink zeigt. (Selbes Verhalten wie Linux, siehe NOTES in der Manpage.)
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Liefert Dateistatus für pathname. Siehe man 2 lstat.
Es gelten dieselben Limitierungen wie für stat. Falls pathname ein Symlink ist liefert lstat im Gegensatz zu stat Informationen über den Symlink, nicht über die Datei auf die der Symlink zeigt.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Liefert Verzeichniseinträge. Siehe man 2 getdents.
Wird verwendet um readdir zu implementieren. Das Dirent struct ähnelt dem linux_dirent64 struct aus der manpage, allerdings sind d_ino und d_off nicht unbedingt 64-bit Werte. Limitierungen: -d_off ist immer 0
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
The documentation for this class was generated from the following file:
- syscall/guarded_vfs.h