4.104.114.84.95
Last change
on this file since f42b726 was
f42b726,
checked in by Joel Sherrill <joel.sherrill@…>, on 01/24/01 at 14:17:28
|
2001-01-24 Ralf Corsepius <corsepiu@…>
- configure.in: Add src/config.h
- src/Makefile.am: Add INCLUDES += -I. to pickup config.h
- src/.cvsignore: Add config.h and stamp-h
- src/*.c: Add config.h support.
|
-
Property mode set to
100644
|
File size:
873 bytes
|
Line | |
---|
1 | /* |
---|
2 | * $Id$ |
---|
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 | 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 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.