MOS Source Code
Loading...
Searching...
No Matches
fs_types.h File Reference
#include <abi-bits/fcntl.h>
#include <mos/mm/mm_types.h>
#include <mos/mos_global.h>
#include <mos/types.h>
+ Include dependency graph for fs_types.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  file_stat_t
 

Macros

#define PATH_DELIM   '/'
 
#define PATH_DELIM_STR   "/"
 
#define PERM_OWNER   0x1C0
 
#define PERM_GROUP   0x38
 
#define PERM_OTHER   0x7
 
#define PERM_READ   0x124
 
#define PERM_WRITE   0x92
 
#define PERM_EXEC   0x49
 
#define PERM_MASK   0777
 

Typedefs

typedef u16 file_perm_t
 

Enumerations

enum  file_type_t {
  FILE_TYPE_REGULAR , FILE_TYPE_DIRECTORY , FILE_TYPE_SYMLINK , FILE_TYPE_CHAR_DEVICE ,
  FILE_TYPE_BLOCK_DEVICE , FILE_TYPE_NAMED_PIPE , FILE_TYPE_SOCKET , FILE_TYPE_UNKNOWN
}
 
enum  open_flags {
  OPEN_NONE = MEM_PERM_NONE , OPEN_READ = MEM_PERM_READ , OPEN_WRITE = MEM_PERM_WRITE , OPEN_EXECUTE = MEM_PERM_EXEC ,
  OPEN_NO_FOLLOW = 1 << 3 , OPEN_CREATE = 1 << 4 , OPEN_TRUNCATE = 1 << 5 , OPEN_DIR = 1 << 6 ,
  OPEN_APPEND = 1 << 7 , OPEN_EXCLUSIVE = 1 << 8
}
 
enum  fstatat_flags { FSTATAT_NONE = 0 , FSTATAT_NOFOLLOW = 1 << 1 , FSTATAT_FILE = 1 << 2 }
 
enum  fd_flags_t { FD_FLAGS_NONE = 0 , FD_FLAGS_CLOEXEC = 1 << 0 }
 

Functions

should_inline void file_format_perm (file_perm_t perms, char buf[10])
 

Macro Definition Documentation

◆ PATH_DELIM

#define PATH_DELIM   '/'

Definition at line 10 of file fs_types.h.

Referenced by dentry_resolve_lastseg(), and dentry_resolve_to_parent().

◆ PATH_DELIM_STR

#define PATH_DELIM_STR   "/"

Definition at line 11 of file fs_types.h.

Referenced by dentry_resolve_to_parent().

◆ PERM_OWNER

#define PERM_OWNER   0x1C0

Definition at line 54 of file fs_types.h.

Referenced by file_format_perm(), ipc_sysfs_create_ino(), and memfd_create().

◆ PERM_GROUP

#define PERM_GROUP   0x38

Definition at line 55 of file fs_types.h.

Referenced by file_format_perm().

◆ PERM_OTHER

#define PERM_OTHER   0x7

Definition at line 56 of file fs_types.h.

Referenced by file_format_perm().

◆ PERM_READ

#define PERM_READ   0x124

◆ PERM_WRITE

#define PERM_WRITE   0x92

◆ PERM_EXEC

#define PERM_EXEC   0x49

Definition at line 59 of file fs_types.h.

Referenced by file_format_perm(), MOS_INIT(), sysfs_register_file(), and vfs_verify_permissions().

◆ PERM_MASK

#define PERM_MASK   0777

Definition at line 61 of file fs_types.h.

Referenced by cpio_inode_trycreate().

Typedef Documentation

◆ file_perm_t

typedef u16 file_perm_t

Definition at line 52 of file fs_types.h.

Enumeration Type Documentation

◆ file_type_t

Enumerator
FILE_TYPE_REGULAR 
FILE_TYPE_DIRECTORY 
FILE_TYPE_SYMLINK 
FILE_TYPE_CHAR_DEVICE 
FILE_TYPE_BLOCK_DEVICE 
FILE_TYPE_NAMED_PIPE 
FILE_TYPE_SOCKET 
FILE_TYPE_UNKNOWN 

Definition at line 13 of file fs_types.h.

◆ open_flags

enum open_flags
Enumerator
OPEN_NONE 
OPEN_READ 
OPEN_WRITE 
OPEN_EXECUTE 
OPEN_NO_FOLLOW 
OPEN_CREATE 
OPEN_TRUNCATE 
OPEN_DIR 
OPEN_APPEND 
OPEN_EXCLUSIVE 

Definition at line 25 of file fs_types.h.

◆ fstatat_flags

Enumerator
FSTATAT_NONE 
FSTATAT_NOFOLLOW 
FSTATAT_FILE 

Definition at line 39 of file fs_types.h.

◆ fd_flags_t

enum fd_flags_t
Enumerator
FD_FLAGS_NONE 
FD_FLAGS_CLOEXEC 

Definition at line 46 of file fs_types.h.

Function Documentation

◆ file_format_perm()

should_inline void file_format_perm ( file_perm_t perms,
char buf[10] )

Definition at line 80 of file fs_types.h.