#include <sys/utsname.h>
|
int
uname (struct utsname *name); |
The utsname structure is defined in the
#include <sys/utsname.h> header file, and contains the following members:
|
#include <sys/utsname.h> #include<stdio.h> int test_uname() { int retVal; struct utsname name ; retVal = uname( &name ); if( !retVal ) { printf("Sysname: %s\n Nodename:%s\n Release: %s\nVersion: %s\nMachine:%s\n"); printf("uname passed"); return 0; } else { printf("failed"); return -1; } }
Output
Sysname: Symbian Nodename: localhost Release: Version: 2:0:1055 Machine: uname passed
© 2005-2007 Nokia |