4.104.114.84.95
Last change
on this file since a29d2e7 was
bf99fe98,
checked in by Ralf Corsepius <ralf.corsepius@…>, on 11/01/04 at 11:34:41
|
2004-11-01 Ralf Corsepius <ralf_corsepius@…>
- libcsupport/src/utsname.c: Revert yesterdays patch.
|
-
Property mode set to
100644
|
File size:
878 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 <inttypes.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 %" PRId32, _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.