LuPPC/src/c/init.c

24 lines
439 B
C
Raw Normal View History

2016-02-12 21:12:27 +11:00
#include "lupi.h"
#ifndef _WIN32
2016-02-12 21:12:27 +11:00
#include <sys/mount.h>
#include <sys/types.h>
#include <unistd.h>
2016-08-18 06:40:11 +10:00
#include <sys/statvfs.h>
#include <sys/mount.h>
2016-02-12 21:12:27 +11:00
void lupi_init() {
if(getpid() == 1) {
mount(NULL, "/sys", "sysfs", 0, NULL);
mount(NULL, "/proc", "procfs", 0, NULL);
}
2016-08-18 06:40:11 +10:00
struct statvfs fsstat;
statvfs("/", &fsstat);
printf("Filesystem / RO status: %X\n",fsstat.f_flag & MS_RDONLY);
2016-02-12 21:12:27 +11:00
}
#else
void lupi_init() {
}
#endif