source: rtems/cpukit/libcsupport/src/utsname.c @ 48b1e29

4.104.114.84.9
Last change on this file since 48b1e29 was 48b1e29, checked in by Joel Sherrill <joel.sherrill@…>, on Aug 30, 2006 at 1:18:40 PM

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
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
27int 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 %" PRId16, _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.