PatchworkOS  966e257
A non-POSIX operating system.
Loading...
Searching...
No Matches
Filesystem

Filesystem interface. More...

Collaboration diagram for Filesystem:

Detailed Description

Filesystem interface.

Data Structures

struct  filesystem_t
 Filesystem structure, represents a filesystem type, e.g. fat32, ramfs, sysfs, etc. More...
 

Functions

uint64_t filesystem_register (filesystem_t *fs)
 Registers a filesystem.
 
void filesystem_unregister (filesystem_t *fs)
 Unregisters a filesystem.
 
filesystem_tfilesystem_get (const char *name)
 Gets a filesystem by name.
 

Function Documentation

◆ filesystem_register()

uint64_t filesystem_register ( filesystem_t fs)

Registers a filesystem.

Parameters
fsThe filesystem to register.
Returns
On success, 0. On failure, ERR and errno is set to:
  • EINVAL: Invalid parameters.
  • Other values from map_insert().

Definition at line 40 of file filesystem.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ filesystem_unregister()

void filesystem_unregister ( filesystem_t fs)

Unregisters a filesystem.

Parameters
fsThe filesystem to unregister, or NULL for no-op.

Definition at line 64 of file filesystem.c.

Here is the call graph for this function:

◆ filesystem_get()

filesystem_t * filesystem_get ( const char *  name)

Gets a filesystem by name.

Parameters
nameThe name of the filesystem.
Returns
On success, the filesystem. On failure, returns NULL.

Definition at line 80 of file filesystem.c.

Here is the call graph for this function:
Here is the caller graph for this function: