OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [cpukit/] [libcsupport/] [src/] [utsname.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
/*
2
 *  utsname.c,v 1.12 2002/01/04 18:28:24 joel Exp
3
 */
4
 
5
#if HAVE_CONFIG_H
6
#include "config.h"
7
#endif
8
 
9
#include <stdio.h>
10
#include <string.h>
11
 
12
#include <errno.h>
13
#include <sys/utsname.h>
14
 
15
 
16
#include <rtems/system.h>
17
#include <rtems/score/object.h>
18
#include <rtems/sptables.h>
19
 
20
#include <rtems/seterr.h>
21
 
22
/*PAGE
23
 *
24
 *  4.4.1 Get System Name, P1003.1b-1993, p. 90
25
 */
26
 
27
int uname(
28
  struct utsname *name
29
)
30
{
31
  /*  XXX: Here is what Solaris returns...
32
          sysname = SunOS
33
          nodename = node_name
34
          release = 5.3
35
          version = Generic_101318-12
36
          machine = sun4m
37
  */
38
 
39
  if ( !name )
40
    rtems_set_errno_and_return_minus_one( EFAULT );
41
 
42
  strcpy( name->sysname, "RTEMS" );
43
 
44
  sprintf( name->nodename, "Node %d", _Objects_Local_node );
45
 
46
  strcpy( name->release, RTEMS_VERSION );
47
 
48
  strcpy( name->version, "" );
49
 
50
  sprintf( name->machine, "%s/%s", CPU_NAME, CPU_MODEL_NAME );
51
 
52
  return 0;
53
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.