diff options
Diffstat (limited to 'test/misc/tst-syscall1.c')
-rw-r--r-- | test/misc/tst-syscall1.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/misc/tst-syscall1.c b/test/misc/tst-syscall1.c new file mode 100644 index 0000000..e3b990e --- /dev/null +++ b/test/misc/tst-syscall1.c @@ -0,0 +1,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; +} |