aboutsummaryrefslogtreecommitdiff
path: root/lib/mlibc/options/linux/generic/sys-sysinfo.cpp
blob: 950c38a33d54019ec85523a4418009fe170469ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <errno.h>
#include <sys/sysinfo.h>

#include <bits/ensure.h>
#include <mlibc/debug.hpp>
#include <mlibc/linux-sysdeps.hpp>

int sysinfo(struct sysinfo *info) {
	MLIBC_CHECK_OR_ENOSYS(mlibc::sys_sysinfo, -1);
	if(int e = mlibc::sys_sysinfo(info); e) {
		errno = e;
		return -1;
	}
	return 0;
}