summaryrefslogtreecommitdiff
path: root/test/misc/tst-syscall1.c
blob: e3b990e0ffae23a8c16aa686896083a348e8831d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdio.h>
#include <unistd.h>
#include <sys/syscall.h>
#include <sys/utsname.h>

int main() {
	int ret;
	struct utsname name;

	ret = syscall(SYS_uname, &name);
   	if (ret == 0) {
		printf("syscall(SYS_uname) says %s-%s\n", name.sysname,
			name.release);
     		return 0;
	}

	return 1;
}