From 88a67ff3680d22599ba7c805a29f01b6bc7f3c4a Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Sat, 4 Sep 2004 22:51:51 +0000 Subject: [PATCH] program to view uname fields --- exp/utsname.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 exp/utsname.c diff --git a/exp/utsname.c b/exp/utsname.c new file mode 100644 index 00000000..a9b25b30 --- /dev/null +++ b/exp/utsname.c @@ -0,0 +1,15 @@ +#include +#include + +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; +}