L4Re - L4 Runtime Environment
L4Re::Vfs::File_system Class Referenceabstract

Basic interface for an L4Re::Vfs file system. More...

#include <vfs.h>

+ Inheritance diagram for L4Re::Vfs::File_system:
+ Collaboration diagram for L4Re::Vfs::File_system:

Public Member Functions

virtual char const * type () const =0 throw ()
 Returns the type of the file system, used in mount as fstype argument. More...
 
virtual int mount (char const *source, unsigned long mountflags, void const *data, cxx::Ref_ptr< File > *dir)=0 throw ()
 Create a directory object dir representing source mounted with this file system. More...
 

Detailed Description

Basic interface for an L4Re::Vfs file system.

Note
For implementing a special file system you may use L4Re::Vfs::Be_file_system as a base class.

The may purpose of this interface is that there is a single object for each supported file-system type (e.g., ext2, vfat) exists in your application and is registered at the L4Re::Vfs::Fs singleton available in via L4Re::Vfs::vfs_ops. At the end the POSIX mount function call the File_system::mount method for the given file-system type given in mount.

Definition at line 867 of file vfs.h.

Member Function Documentation

◆ mount()

virtual int L4Re::Vfs::File_system::mount ( char const *  source,
unsigned long  mountflags,
void const *  data,
cxx::Ref_ptr< File > *  dir 
)
throw (
)
pure virtual

Create a directory object dir representing source mounted with this file system.

Parameters
sourceThe path to the source device to mount. This may also be some URL or anything file-system specific.
mountflagsThe mount flags as specified in the POSIX mount call.
dataThe data as specified in the POSIX mount call. The contents are file-system specific.
Return values
dirA new directory object representing the file-system root directory.
Returns
0 on success, and <0 on error (e.g. -EINVAL).

Referenced by L4Re::Vfs::Fs::mount().

+ Here is the caller graph for this function:

◆ type()

virtual char const* L4Re::Vfs::File_system::type ( ) const
throw (
)
pure virtual

Returns the type of the file system, used in mount as fstype argument.

Note
This method is already provided by Be_file_system.

Implemented in L4Re::Vfs::Be_file_system.


The documentation for this class was generated from the following file: