mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
parent
6c7356072d
commit
20f7f5b64f
@ -5,6 +5,15 @@ ifeq ($(filter-out $(SPECS),arm),)
|
||||
# rump include shadows some parts of 'machine' on ARM only,
|
||||
# Therefore, it must be included before RUMP_BASE/include/machine
|
||||
INC_DIR := $(RUMP_PORT_DIR)/src/sys/rump/include $(INC_DIR)
|
||||
INC_DIR += $(RUMP_PORT_DIR)/src/sys/arch/arm/include
|
||||
endif
|
||||
|
||||
ifeq ($(filter-out $(SPECS),x86_32),)
|
||||
INC_DIR += $(RUMP_PORT_DIR)/src/sys/arch/i386/include
|
||||
endif
|
||||
|
||||
ifeq ($(filter-out $(SPECS),x86_64),)
|
||||
INC_DIR += $(RUMP_PORT_DIR)/src/sys/arch/amd64/include
|
||||
endif
|
||||
|
||||
INC_DIR += $(LIBGCC_INC_DIR) \
|
||||
|
@ -29,6 +29,7 @@ extern "C" {
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/event.h>
|
||||
#include <sys/time.h>
|
||||
@ -413,6 +414,17 @@ class Vfs::Rump_file_system : public File_system
|
||||
}
|
||||
|
||||
Genode::log(fs_type," file system mounted");
|
||||
|
||||
struct statvfs stats;
|
||||
int err = rump_sys_statvfs1("/", &stats, ST_WAIT);
|
||||
if (err == 0) {
|
||||
double factor = 1.0 / (1<<30);
|
||||
double available = factor * stats.f_bsize * stats.f_bavail;
|
||||
double total = factor * stats.f_bsize * stats.f_blocks;
|
||||
|
||||
Genode::log("Space available: ", available, " GiB / ", total, " GiB");
|
||||
Genode::log("Nodes available: ", stats.f_favail, "/", stats.f_files);
|
||||
}
|
||||
}
|
||||
|
||||
/***************************
|
||||
|
Loading…
x
Reference in New Issue
Block a user