Fennix
1.0.0
Full Documentation
|
Go to the source code of this file.
Data Structures | |
struct | kstat |
struct | kdirent |
struct | Inode |
struct | InodeOperations |
struct | SuperBlockOperations |
struct | FileSystemInfo |
Macros | |
#define | SEEK_SET 0 |
#define | SEEK_CUR 1 |
#define | SEEK_END 2 |
#define | S_IFMT32 037777600000 |
#define | S_IFMT 0170000 |
#define | S_IFWHT 0160000 |
#define | S_IFSOCK 0140000 |
#define | S_IFLNK 0120000 |
#define | S_IFREG 0100000 |
#define | S_IFBLK 0060000 |
#define | S_IFDIR 0040000 |
#define | S_IFCHR 0020000 |
#define | S_IFIFO 0010000 |
#define | S_ISUID 04000 |
#define | S_ISGID 02000 |
#define | S_ISVTX 01000 |
#define | S_IRWXU 0700 |
#define | S_IRUSR 0400 |
#define | S_IWUSR 0200 |
#define | S_IXUSR 0100 |
#define | S_IRWXG 0070 |
#define | S_IRGRP 0040 |
#define | S_IWGRP 0020 |
#define | S_IXGRP 0010 |
#define | S_IRWXO 0007 |
#define | S_IROTH 0004 |
#define | S_IWOTH 0002 |
#define | S_IXOTH 0001 |
#define | S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) |
#define | S_ISCHR(mode) (((mode) & S_IFMT) == S_IFCHR) |
#define | S_ISBLK(mode) (((mode) & S_IFMT) == S_IFBLK) |
#define | S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG) |
#define | S_ISFIFO(mode) (((mode) & S_IFMT) == S_IFIFO) |
#define | S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK) |
#define | S_ISSOCK(mode) (((mode) & S_IFMT) == S_IFSOCK) |
#define | DT_UNKNOWN 0x0 |
#define | DT_FIFO 0x1 |
#define | DT_CHR 0x2 |
#define | DT_DIR 0x4 |
#define | DT_BLK 0x6 |
#define | DT_REG 0x8 |
#define | DT_LNK 0xA |
#define | DT_SOCK 0xC |
#define | DT_WHT 0xE |
#define | IFTODT(x) ((x) >> 12 & 0xF) |
#define | DTTOIF(x) ((x) << 12) |
#define | SYMLOOP_MAX 40 |
#define | static_assert _Static_assert |
#define | INODE_MAKEDEV(major, minor) |
#define | INODE_MAJOR(rdev) ((int)(((rdev) >> 8) & 0xFFF)) |
#define | INODE_MINOR(rdev) ((int)((rdev) & 0xFF)) |
#define | I_FLAG_ROOT 0x1 |
#define | I_FLAG_MOUNTPOINT 0x2 |
#define | I_FLAG_CACHE_KEEP 0x4 |
Functions | |
struct InodeOperations | __attribute__ ((packed)) |
dev_t | RegisterFileSystem (struct FileSystemInfo *Info, struct Inode *Root) |
int | UnregisterFileSystem (dev_t Device) |
Variables | |
int(* | Lookup )(struct Inode *Parent, const char *Name, struct Inode **Result) |
int(* | Create )(struct Inode *Parent, const char *Name, mode_t Mode, struct Inode **Result) |
int(* | Remove )(struct Inode *Parent, const char *Name) |
int(* | Rename )(struct Inode *Parent, const char *OldName, const char *NewName) |
ssize_t(* | Read )(struct Inode *Node, void *Buffer, size_t Size, off_t Offset) |
ssize_t(* | Write )(struct Inode *Node, const void *Buffer, size_t Size, off_t Offset) |
int(* | Truncate )(struct Inode *Node, off_t Size) |
int(* | Open )(struct Inode *Node, int Flags, mode_t Mode) |
int(* | Close )(struct Inode *Node) |
int(* | Ioctl )(struct Inode *Node, unsigned long Request, void *Argp) |
ssize_t(* | ReadDir )(struct Inode *Node, struct kdirent *Buffer, size_t Size, off_t Offset, off_t Entries) |
int(* | MkDir )(struct Inode *Parent, const char *Name, mode_t Mode, struct Inode **Result) |
int(* | RmDir )(struct Inode *Parent, const char *Name) |
int(* | SymLink )(struct Inode *Parent, const char *Name, const char *Target, struct Inode **Result) |
ssize_t(* | ReadLink )(struct Inode *Node, char *Buffer, size_t Size) |
off_t(* | Seek )(struct Inode *Node, off_t Offset) |
int(* | Stat )(struct Inode *Node, struct kstat *Stat) |
int(* | AllocateInode )(struct FileSystemInfo *Info, struct Inode **Result) |
int(* | DeleteInode )(struct FileSystemInfo *Info, struct Inode *Node) |
int(* | Synchronize )(struct FileSystemInfo *Info, struct Inode *Node) |
int(* | Destroy )(struct FileSystemInfo *Info) |
const char * | Name |
const char * | RootName |
int | Flags |
struct SuperBlockOperations | SuperOps |
struct InodeOperations | Ops |
void * | PrivateData |
struct kstat |
Data Fields | ||
---|---|---|
time_t | AccessTime |
Time of last access. |
mode_t | Attribute |
Additional file attributes. |
blkcnt_t | Blocks |
Number of blocks allocated. |
blksize_t | BlockSize |
Optimal I/O block size. |
time_t | ChangeTime |
Time of last status change. |
dev_t | Device |
Device ID of the file. |
gid_t | GroupID |
Group ID of the file's owner. |
nlink_t | HardLinks |
Number of hard links. |
ino_t | Index |
Inode number. |
mode_t | Mode |
File type and mode. |
time_t | ModifyTime |
Time of last modification. |
dev_t | RawDevice |
Device ID for special files. |
off_t | Size |
Size of the file in bytes. |
uid_t | UserID |
User ID of the file's owner. |
struct kdirent |
struct Inode |
struct FileSystemInfo |
Data Fields | ||
---|---|---|
int | Flags | |
const char * | Name | |
struct InodeOperations | Ops | |
void * | PrivateData | |
const char * | RootName | |
struct SuperBlockOperations | SuperOps |
#define INODE_MAJOR | ( | rdev | ) | ((int)(((rdev) >> 8) & 0xFFF)) |
Definition at line 295 of file fs.h.
#define INODE_MAKEDEV | ( | major, | |
minor | |||
) |
#define S_IFMT 0170000 |
File type mask.
This mask is used to extract the file type from the mode field of a stat structure.
Doing bitwise AND with this mask will return the file type. Example: st_mode & S_IFMT
Doing bitwise negation and AND with this mask will return the permissions. Example: st_mode & ~S_IFMT
#define S_IFMT32 037777600000 |
struct FileSystemInfo __attribute__ | ( | (packed) | ) |
dev_t RegisterFileSystem | ( | struct FileSystemInfo * | Info, |
struct Inode * | Root | ||
) |
int UnregisterFileSystem | ( | dev_t | Device | ) |
int(* AllocateInode) (struct FileSystemInfo *Info, struct Inode **Result) | ( | struct FileSystemInfo * | Info, |
struct Inode ** | Result | ||
) |
int(* DeleteInode) (struct FileSystemInfo *Info, struct Inode *Node) | ( | struct FileSystemInfo * | Info, |
struct Inode * | Node | ||
) |
int(* Destroy) (struct FileSystemInfo *Info) | ( | struct FileSystemInfo * | Info | ) |
struct InodeOperations Ops |
struct SuperBlockOperations SuperOps |
int(* Synchronize) (struct FileSystemInfo *Info, struct Inode *Node) | ( | struct FileSystemInfo * | Info, |
struct Inode * | Node | ||
) |