source: rtems/cpukit/libcsupport/src/utsname.c @ 1ceface

4.104.114.84.95
Last change on this file since 1ceface was 1ceface, checked in by Joel Sherrill <joel.sherrill@…>, on Oct 6, 1995 at 4:33:30 PM

moved to new development machine and went to gcc 2.7.0

  • Property mode set to 100644
File size: 996 bytes
Line 
1/*  utsname.c
2 *
3 */
4
5#include <stdio.h>
6#include <string.h>
7
8#include <sys/utsname.h>
9
10#include <rtems/score/system.h>
11#include <rtems/score/object.h>
12
13/*PAGE
14 *
15 *  4.4.1 Get System Name, P1003.1b-1993, p. 90
16 */
17
18int uname(
19  struct utsname *name
20)
21{
22  /*  XXX: Here is what Solaris returns...
23          sysname = SunOS
24          nodename = node_name
25          release = 5.3
26          version = Generic_101318-12
27          machine = sun4m
28  */
29
30  strcpy( name->sysname, "RTEMS" );
31
32  sprintf( name->nodename, "Node %d\n", _Objects_Local_node );
33
34  /* XXX release string is in BAD format for this routine!!! */ 
35  strcpy( name->release, "3.2.0" );
36 
37  /* XXX does this have any meaning for RTEMS */
38   
39  strcpy( name->release, "" );
40
41  sprintf( name->machine, "%s/%s", CPU_NAME, CPU_MODEL_NAME );
42
43  return 0;
44}
45
46#ifdef NOT_IMPLEMENTED_YET
47
48/*PAGE
49 *
50 *  4.5.2 Get Process Times, P1003.1b-1993, p. 92
51 */
52
53clock_t times(
54  struct tms   *buffer
55)
56{
57  return POSIX_NOT_IMPLEMENTED();
58}
59
60#endif
Note: See TracBrowser for help on using the repository browser.