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
commit 1c3badede3
Notes: sideshowbarker 2024-07-18 17:46:42 +09:00
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;
};