• Navigation überspringen
  • Zur Navigation
  • Zum Seitenende
Organisationsmenü öffnen Organisationsmenü schließen
Friedrich-Alexander-Universität Lehrstuhl für Informatik 4 (Systemsoftware)
  • FAUZur zentralen FAU Website
  1. Friedrich-Alexander-Universität
  2. Technische Fakultät
  3. Department Informatik
Suche öffnen
  • English
  • Campo
  • StudOn
  • FAUdir
  • Stellenangebote
  • Lageplan
  • Hilfe im Notfall
  1. Friedrich-Alexander-Universität
  2. Technische Fakultät
  3. Department Informatik
Friedrich-Alexander-Universität Lehrstuhl für Informatik 4 (Systemsoftware)
Menu Menu schließen
  • Lehrstuhl
    • Team
    • Aktuelles
    • Kontakt und Anfahrt
    • Leitbild
    • 50-jähriges Jubiläum
    Portal Lehrstuhl
  • Forschung
    • Forschungsbereiche
      • Betriebssysteme
      • Confidential Computing
      • Eingebettete Systemsoftware
      • Verteilte Systeme
    • Projekte
      • AIMBOS
      • BALu
      • BFT2Chain
      • DOSS
      • Mirador
      • NEON
      • PAVE
      • ResPECT
      • Watwa
    • Projektkampagnen
      • maRE
    • Seminar
      • Systemsoftware
    Portal Forschung
  • Publikationen
  • Lehre
    • Sommersemester 2025
      • Applied Software Architecture
      • Ausgewählte Kapitel der Systemsoftware
      • Betriebssystemtechnik
      • Projekt angewandte Systemsoftwaretechnik
      • System-Level Programming
      • Systemnahe Programmierung in C
      • Systemprogrammierung 1
      • Verteilte Systeme
    • Wintersemester 2024/25
      • Betriebssysteme
      • Middleware – Cloud Computing
      • Systemprogrammierung 2
      • Verlässliche Echtzeitsysteme
      • Virtuelle Maschinen
      • Web-basierte Systeme
    Portal Lehre
  • Examensarbeiten
  1. Startseite
  2. Extern

Extern

Bereichsnavigation: Lehre
  • Betriebssysteme
    • Vorlesung
      • Folien
    • Übung
      • Seminar
      • Aufgaben
      • Aufgabe 0: C++ Streams
        • Aufgabe 1: Ein-/Ausgabe
          • Aufgabe 2: Unterbrechungen
            • Aufgabe 3: Pro-/Epilog
              • Aufgabe 4: Kontextwechsel
                • Aufgabe 5: Zeitscheiben
                  • Aufgabe 6: Synchronisation
                    • Aufgabe 7: Anwendung
                      • Assembler Crashkurs
                        • C++ Crashkurs
                          • Entwicklungsumgebung
                            • FAQ
                              • Ruhmeshalle
                              • Evaluation

                              Aufgabe 7: Anwendung

                              Static Public Member Functions | List of all members
                              GuardedVFS Class Reference

                              Guarded interface to the VFS used by user applications. More...

                              #include <syscall/guarded_vfs.h>

                              + Inheritance diagram for GuardedVFS:
                              [legend]
                              + Collaboration diagram for GuardedVFS:
                              [legend]

                              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

                              static int GuardedVFS::mount ( const char *  fstype,
                              BlockDevice *  bdev,
                              const void *  data 
                              )
                              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

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static int GuardedVFS::umount ( )
                              inlinestatic

                              Siehe man 2 umount.

                              Gibt -EBUSY zurück, falls das Dateisystem noch verwendet wird (offene Dateien). Limitierungen: -target (siehe manpage) ist immer "/".

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static void GuardedVFS::sync ( )
                              inlinestatic

                              Schreibt Änderungen im Puffer auf die Festplatte. Siehe man 2 sync.

                              Zurzeit nur nötig, um Änderungen an Inodes zu schreiben.

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static int GuardedVFS::open ( const char *  pathname,
                              int  flags 
                              )
                              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

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static int GuardedVFS::close ( int  fd)
                              inlinestatic

                              Schließt einen Dateideskriptor. Siehe man 2 close.

                              Parameters
                              fdFiledeskriptor zum Schließen.

                              Es gelten die "NOTES" aus der manpage.

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static ssize_t GuardedVFS::read ( int  fd,
                              void *  buf,
                              size_t  count 
                              )
                              inlinestatic

                              Lesen von einem Dateideskriptor fd in Speicher buf der Länge count. Siehe man 2 read.

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static ssize_t GuardedVFS::write ( int  fd,
                              const void *  buf,
                              size_t  count 
                              )
                              inlinestatic

                              Schreiben von Daten aus Speicher buf der Länge count an Dateideskriptor fd. Siehe man 2 write.

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static off_t GuardedVFS::lseek ( int  fd,
                              off_t  offset,
                              int  whence 
                              )
                              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.)

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static int GuardedVFS::truncate ( const char *  path,
                              off_t  length 
                              )
                              inlinestatic

                              Setzt die Länge der Datei an path auf length. Siehe man 2 truncate.

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static int GuardedVFS::ftruncate ( int  fd,
                              off_t  length 
                              )
                              inlinestatic

                              Kürzt Datei für Dateideskriptor fd auf Länge length. Siehe man 2 ftruncate.

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static int GuardedVFS::link ( const char *  oldpath,
                              const char *  newpath 
                              )
                              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.)

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static int GuardedVFS::symlink ( const char *  target,
                              const char *  linkpath 
                              )
                              inlinestatic

                              Erstellt einen symbolischen Verweis mit Inhalt target. Siehe man 2 symlink.

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static int GuardedVFS::unlink ( const char *  pathname)
                              inlinestatic

                              Löscht Namen und bei keinem verbleibenden Verweis mehr die Datei pathname. Siehe man 2 unlink.

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static int GuardedVFS::rmdir ( const char *  pathname)
                              inlinestatic

                              Löscht Verzeichnis pathname. Siehe man 2 rmdir.

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static int GuardedVFS::rename ( const char *  oldpath,
                              const char *  newpath 
                              )
                              inlinestatic

                              Verschieben von Dateien/Verzeichnissen. Siehe man 2 rename.

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static int GuardedVFS::stat ( const char *  pathname,
                              struct stat *  statbuf 
                              )
                              inlinestatic

                              Liefert Dateistatus für pathname. Siehe man 2 stat.

                              Limitierungen: -st_dev und st_rdev sind immer 0

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static int GuardedVFS::lstat ( const char *  pathname,
                              struct stat *  statbuf 
                              )
                              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.

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static int GuardedVFS::fstat ( int  fd,
                              struct stat *  statbuf 
                              )
                              inlinestatic

                              Liefert Dateistatus für Dateideskriptor fd. Siehe man 2 fstat.

                              Es gelten dieselben Limitierungen wie für stat.

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static ssize_t GuardedVFS::readlink ( const char *  pathname,
                              char *  buf,
                              size_t  bufsiz 
                              )
                              inlinestatic

                              Liest den Inhalt eines symbolischen Verweises. Siehe man 2 readlink.

                              Achtung: Der Buffer wird nicht null-terminiert.

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static int GuardedVFS::getdents ( int  fd,
                              Dirent *  dirp,
                              int  count 
                              )
                              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

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static DIR * GuardedVFS::opendir ( const char *  name)
                              inlinestatic

                              Öffnet ein Verzeichnis name. Siehe man 3 opendir.

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static struct Dirent * GuardedVFS::readdir ( DIR *  dirp)
                              inlinestatic

                              Liest einen Verzeichniseintrag. Siehe man 3 readdir.

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static void GuardedVFS::rewinddir ( DIR *  dirp)
                              inlinestatic

                              Setzt die Position im Verzeichnis zurück. Siehe man 3 rewinddir.

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static int GuardedVFS::closedir ( DIR *  dirp)
                              inlinestatic

                              Schließt ein Verzeichnis. Siehe man 3 closedir.

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static int GuardedVFS::mkdir ( const char *  pathname)
                              inlinestatic

                              Erstellt Verzeichnis pathname. Siehe man 2 mkdir.

                              Limitierungen: -pathname darf nicht mit einem '/' enden.

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static int GuardedVFS::chdir ( const char *  path)
                              inlinestatic

                              Wechselt in Verzeichnis path. Siehe man 2 chdir.

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.
                              static int GuardedVFS::fchdir ( int  fd)
                              inlinestatic

                              Wechselt in Verzeichnis fd. Siehe man 2 fchdir.

                              Note
                              This method is equal to the correspondent method in base class VFS, with the only difference that the call will be protected by a Guarded object.

                              The documentation for this class was generated from the following file:
                              • syscall/guarded_vfs.h
                              Friedrich-Alexander-Universität
                              Erlangen-Nürnberg

                              Schlossplatz 4
                              91054 Erlangen
                              • Impressum
                              • Datenschutz
                              • Barrierefreiheit
                              • Facebook
                              • RSS Feed
                              • Xing
                              Nach oben