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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [posix/] [src/] [utsname.c] - Blame information for rev 173

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
2
 *  $Id: utsname.c,v 1.2 2001-09-27 11:59:17 chris Exp $
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
 
23
int 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
}

powered by: WebSVN 2.1.0

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