mirror of
https://github.com/JannisHeydemann/BoredOS.git
synced 2026-05-30 10:26:59 +00:00
Implement df command and statfs support
This commit is contained in:
@@ -166,6 +166,14 @@ static bool sysfs_is_dir(void *fs_private, const char *path) {
|
||||
return sysfs_exists(fs_private, path);
|
||||
}
|
||||
|
||||
static int sysfs_statfs(void *fs_private, vfs_statfs_t *stat) {
|
||||
(void)fs_private;
|
||||
stat->total_blocks = 0;
|
||||
stat->free_blocks = 0;
|
||||
stat->block_size = 512;
|
||||
return 0;
|
||||
}
|
||||
|
||||
vfs_fs_ops_t sysfs_ops = {
|
||||
.open = sysfs_open,
|
||||
.close = sysfs_close,
|
||||
@@ -173,7 +181,8 @@ vfs_fs_ops_t sysfs_ops = {
|
||||
.write = sysfs_write,
|
||||
.readdir = sysfs_readdir,
|
||||
.exists = sysfs_exists,
|
||||
.is_dir = sysfs_is_dir
|
||||
.is_dir = sysfs_is_dir,
|
||||
.statfs = sysfs_statfs
|
||||
};
|
||||
|
||||
vfs_fs_ops_t* sysfs_get_ops(void) {
|
||||
|
||||
Reference in New Issue
Block a user