os/ossrv/genericopenlibs/openenvcore/include/sys/utsname.dosc
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /** @file  ../include/sys/utsname.h
     2 @internalComponent
     3 */
     4 
     5 /** @fn  uname(struct utsname *buf)
     6 @param buf
     7 @return   Upon successful completion, a non-negative value is returned. Otherwise, 
     8 -1 is returned and errno is set to indicate the error.
     9 
    10 @code
    11  sysname Name of the operating system implementation.
    12  nodename Network name of this machine.
    13  release Release level of the operating system.
    14  version Version level of the operating system.
    15  machine Machine hardware platform.
    16 
    17 @endcode
    18   The uname function stores NULL -terminated strings of information identifying the current system 
    19 into the structure referenced by name .
    20 
    21  The utsname structure is defined in the \#include \<sys/utsname.h\> header file, and contains 
    22   the following members: sysname Name of the operating system implementation. nodename Network name of this machine. release Release level of the operating system. version Version level of the operating system. machine Machine hardware platform.
    23 
    24 Examples:
    25 @code
    26 #include <sys/utsname.h>
    27 #include<stdio.h>
    28 int test_uname()
    29 {
    30     int retVal;
    31     struct utsname name ;
    32     retVal = uname( &name; );
    33     if( !retVal )       
    34     {
    35       printf("Sysname: %s
    36  Nodename:%s
    37  Release:
    38       %s
    39 Version: %s
    40 Machine:%s
    41 ");
    42       printf("uname passed");
    43       return 0;
    44     }
    45     else
    46     {
    47       printf("failed");
    48       return -1;
    49     }
    50 }
    51 
    52 @endcode
    53  Output
    54 @code
    55 Sysname: Symbian
    56 Nodename: localhost
    57 Release:
    58 Version: 2:0:1055
    59 Machine:
    60 uname passed
    61 
    62 @endcode
    63  
    64 
    65 @publishedAll
    66 @externallyDefinedApi
    67 */
    68 
    69 /** @struct utsname
    70 
    71 Contains the following members,
    72 
    73 @publishedAll
    74 @externallyDefinedApi
    75 */
    76 
    77 /** @var utsname::sysname
    78 Name of this OS.
    79 */
    80 
    81 /** @var utsname::nodename
    82 Name of this network node.
    83 */
    84 
    85 /** @var utsname::release
    86 Release level.
    87 */
    88 
    89 /** @var utsname::version
    90 Version level.
    91 */
    92 
    93 /** @var utsname::machine
    94 Hardware type.
    95 */
    96