diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-07-15 22:56:45 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-07-15 22:56:45 +0000 |
commit | 4d47256b4b685afba422925d22f8b6aa55c38109 (patch) | |
tree | bbb3a467ac150869b3e083e16c02f2ad24aded21 /cpukit | |
parent | 2008-07-15 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-4d47256b4b685afba422925d22f8b6aa55c38109.tar.bz2 |
2008-07-15 Joel Sherrill <joel.sherrill@oarcorp.com>
* rtems/include/rtems.h, sapi/Makefile.am: Add simple helper to get
RTEMS version string.
* sapi/src/getversionstring.c: New file.
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/ChangeLog | 6 | ||||
-rw-r--r-- | cpukit/rtems/include/rtems.h | 9 | ||||
-rw-r--r-- | cpukit/sapi/Makefile.am | 2 | ||||
-rw-r--r-- | cpukit/sapi/src/getversionstring.c | 21 |
4 files changed, 37 insertions, 1 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index e8f60bec3d..26336cefb3 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,9 @@ +2008-07-15 Joel Sherrill <joel.sherrill@oarcorp.com> + + * rtems/include/rtems.h, sapi/Makefile.am: Add simple helper to get + RTEMS version string. + * sapi/src/getversionstring.c: New file. + 2008-07-10 Peter Rasmussen <Peter.Rasmussen@embedded-brains.de> * score/cpu/m68k/cpu_asm.S, cpukit/score/cpu/m68k/rtems/asm.h, diff --git a/cpukit/rtems/include/rtems.h b/cpukit/rtems/include/rtems.h index 537a6c8171..4bc89d704e 100644 --- a/cpukit/rtems/include/rtems.h +++ b/cpukit/rtems/include/rtems.h @@ -78,6 +78,15 @@ extern "C" { #include <rtems/score/sysstate.h> /** + * @brief Obtain the RTEMS Version String + * + * This method may be used to obtain the RTEMS version string. + * + * @return This method returns a pointer to the version string. + */ +const char *rtems_get_version_string(void); + +/** * This constant indicates whether this processor variant has * hardware floating point support. */ diff --git a/cpukit/sapi/Makefile.am b/cpukit/sapi/Makefile.am index a9de4c47e0..d279aa88e9 100644 --- a/cpukit/sapi/Makefile.am +++ b/cpukit/sapi/Makefile.am @@ -26,7 +26,7 @@ libsapi_a_SOURCES = src/debug.c src/extension.c src/extensioncreate.c \ src/exshutdown.c src/io.c src/ioclose.c src/iocontrol.c src/iodata.c \ src/ioinitialize.c src/ioopen.c src/ioread.c src/ioregisterdriver.c \ src/iounregisterdriver.c src/iowrite.c src/itronapi.c src/posixapi.c \ - src/rtemsapi.c src/extensiondata.c + src/rtemsapi.c src/extensiondata.c src/getversionstring.c libsapi_a_CPPFLAGS = $(AM_CPPFLAGS) include $(srcdir)/preinstall.am diff --git a/cpukit/sapi/src/getversionstring.c b/cpukit/sapi/src/getversionstring.c new file mode 100644 index 0000000000..4295be56dc --- /dev/null +++ b/cpukit/sapi/src/getversionstring.c @@ -0,0 +1,21 @@ +/* + * COPYRIGHT (c) 1989-2008. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#if HAVE_CONFIG_H +#include "config.h" +#endif + +#include <rtems/system.h> + +const char *rtems_get_version_string(void) +{ + return _RTEMS_version; +} |