1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:44:58 +00:00

Kernel: Add statvfs & fstatvfs Syscalls

These syscalls fill a statvfs struct with various data
about the mount on the VFS.
This commit is contained in:
Justin 2021-05-19 11:31:43 +02:00 committed by Andreas Kling
parent 721a867c65
commit 1c3badede3
5 changed files with 133 additions and 1 deletions

View file

@ -718,3 +718,25 @@ enum {
DT_WHT = 14
#define DT_WHT DT_WHT
};
typedef uint64_t fsblkcnt_t;
typedef uint64_t fsfilcnt_t;
#define ST_RDONLY 0x1
#define ST_NOSUID 0x2
struct statvfs {
unsigned long f_bsize;
unsigned long f_frsize;
fsblkcnt_t f_blocks;
fsblkcnt_t f_bfree;
fsblkcnt_t f_bavail;
fsfilcnt_t f_files;
fsfilcnt_t f_ffree;
fsfilcnt_t f_favail;
unsigned long f_fsid;
unsigned long f_flag;
unsigned long f_namemax;
};