4.104.114.84.95
Last change
on this file since 48b1e29 was
48b1e29,
checked in by Joel Sherrill <joel.sherrill@…>, on 08/30/06 at 13:18:40
|
2006-08-30 Joel Sherrill <joel@…>
- libcsupport/src/utsname.c, libnetworking/libc/res_debug.c,
libnetworking/net/if_media.h, libnetworking/rtems/rtems_mii_ioctl.c,
librpc/src/rpc/svc_simple.c: Remove printf format warnings.
|
-
Property mode set to
100644
|
File size:
878 bytes
|
Rev | Line | |
---|
[7f72217e] | 1 | /* |
---|
[eb5a7e07] | 2 | * $Id$ |
---|
[5e9b32b] | 3 | */ |
---|
| 4 | |
---|
[f42b726] | 5 | #if HAVE_CONFIG_H |
---|
| 6 | #include "config.h" |
---|
| 7 | #endif |
---|
| 8 | |
---|
[5e9b32b] | 9 | #include <stdio.h> |
---|
| 10 | #include <string.h> |
---|
| 11 | |
---|
[31473b7] | 12 | #include <errno.h> |
---|
[5e9b32b] | 13 | #include <sys/utsname.h> |
---|
| 14 | |
---|
[31473b7] | 15 | |
---|
[f4719d5a] | 16 | #include <rtems/system.h> |
---|
[5e9b32b] | 17 | #include <rtems/score/object.h> |
---|
[0f9ff459] | 18 | #include <inttypes.h> |
---|
[31473b7] | 19 | |
---|
[188c82b] | 20 | #include <rtems/seterr.h> |
---|
[5e9b32b] | 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 |
---|
[1ceface] | 33 | nodename = node_name |
---|
[5e9b32b] | 34 | release = 5.3 |
---|
| 35 | version = Generic_101318-12 |
---|
| 36 | machine = sun4m |
---|
| 37 | */ |
---|
| 38 | |
---|
[31473b7] | 39 | if ( !name ) |
---|
[e180a77e] | 40 | rtems_set_errno_and_return_minus_one( EFAULT ); |
---|
[31473b7] | 41 | |
---|
[5e9b32b] | 42 | strcpy( name->sysname, "RTEMS" ); |
---|
| 43 | |
---|
[48b1e29] | 44 | sprintf( name->nodename, "Node %" PRId16, _Objects_Local_node ); |
---|
[5e9b32b] | 45 | |
---|
[31473b7] | 46 | strcpy( name->release, RTEMS_VERSION ); |
---|
[5e9b32b] | 47 | |
---|
[31473b7] | 48 | strcpy( name->version, "" ); |
---|
[50f32b11] | 49 | |
---|
[5e9b32b] | 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.