Files
RedBear-OS/tests/sys_utsname/uname.c
T
Jeremy Soller 950b4526c7 - Disable output of empty header files
- Remove incorrect header styles
- Use export.replace where header style was previously needed
- Check compilation of tests using system gcc
2018-11-26 21:35:02 -07:00

20 lines
544 B
C

#include <stdio.h>
#include <sys/utsname.h>
int main() {
struct utsname system_info;
int result = uname(&system_info);
if (result < 0) {
perror("uname");
} else {
printf("sysname: '%s'\n", system_info.sysname);
printf("nodename: '%s'\n", system_info.nodename);
printf("release: '%s'\n", system_info.release);
printf("version: '%s'\n", system_info.version);
printf("machine: '%s'\n", system_info.machine);
//printf("domainname: '%s'\n", system_info.domainname);
}
}