2016-02-12 21:12:27 +11:00
|
|
|
#include "lupi.h"
|
2016-02-28 01:30:34 +11:00
|
|
|
|
|
|
|
#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
|
|
|
}
|
2016-02-28 01:30:34 +11:00
|
|
|
#else
|
|
|
|
void lupi_init() {
|
|
|
|
|
|
|
|
}
|
|
|
|
#endif
|