source: rtems/cpukit/libcsupport/src/utsname.c @ 9b05600

4.104.114.84.95
Last change on this file since 9b05600 was 31473b7, checked in by Joel Sherrill <joel.sherrill@…>, on 11/16/99 at 16:03:21

Works now.

Removed times() since the version in the C Library support code is
fine.

  • Property mode set to 100644
File size: 833 bytes
Line 
1/*
2 *  $Id$
3 */
4
5#include <stdio.h>
6#include <string.h>
7
8#include <errno.h>
9#include <sys/utsname.h>
10
11
12#include <rtems/system.h>
13#include <rtems/score/object.h>
14#include <rtems/sptables.h>
15
16#include <rtems/posix/seterr.h>
17
18/*PAGE
19 *
20 *  4.4.1 Get System Name, P1003.1b-1993, p. 90
21 */
22
23int uname(
24  struct utsname *name
25)
26{
27  /*  XXX: Here is what Solaris returns...
28          sysname = SunOS
29          nodename = node_name
30          release = 5.3
31          version = Generic_101318-12
32          machine = sun4m
33  */
34
35  if ( !name )
36    set_errno_and_return_minus_one( EFAULT );
37
38  strcpy( name->sysname, "RTEMS" );
39
40  sprintf( name->nodename, "Node %d", _Objects_Local_node );
41
42  strcpy( name->release, RTEMS_VERSION );
43
44  strcpy( name->version, "" );
45 
46  sprintf( name->machine, "%s/%s", CPU_NAME, CPU_MODEL_NAME );
47
48  return 0;
49}
Note: See TracBrowser for help on using the repository browser.