fs_register

int fs_register(const struct fs_ops *fops)

Registers a file system with the abstraction layer. On success, all calls into fs/fs will use the registered file system.

Arguments

ArgumentDescription
fopsA pointer to const struct fs_ops. Specifies which file system routines get mapped to the fs/fs API. All function pointers must be filled in.

Returned values

  • 0 on success
  • FS_EEXIST if a file system has already been registered

Notes

Only one file system can be registered. The registered file system is mounted in the root directory (/).

Header file

#include "fs/fs.h"