program to view uname fields

This commit is contained in:
Doug MacEachern 2004-09-04 22:51:51 +00:00
parent 6876eeabd3
commit 88a67ff368
1 changed files with 15 additions and 0 deletions

15
exp/utsname.c Normal file
View File

@ -0,0 +1,15 @@
#include <stdio.h>
#include <sys/utsname.h>
int main(int argc, char **argv) {
struct utsname name;
uname(&name);
printf("sysname....%s\n", name.sysname);
printf("nodename...%s\n", name.nodename);
printf("release....%s\n", name.release);
printf("version....%s\n", name.version);
printf("machine....%s\n", name.machine);
return 0;
}