diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-08-08 15:56:13 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-08-08 15:56:13 +0000 |
commit | 0185851c447d92d6087014c51da4c632d908c414 (patch) | |
tree | 8355a12da1025052e4d96a9fe3e6b278bd34d2e1 | |
parent | 2008-08-08 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-0185851c447d92d6087014c51da4c632d908c414.tar.bz2 |
2008-08-08 Joel Sherrill <joel.sherrill@OARcorp.com>
* rtems/include/rtems.h, sapi/Makefile.am: Add Add simple helper to get
RTEMS version string.
* sapi/src/getversionstring.c: New file.
-rw-r--r-- | cpukit/ChangeLog | 6 | ||||
-rw-r--r-- | cpukit/rtems/include/rtems.h | 9 | ||||
-rw-r--r-- | cpukit/sapi/Makefile.am | 3 | ||||
-rw-r--r-- | cpukit/sapi/src/getversionstring.c | 21 |
4 files changed, 38 insertions, 1 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 85bdcc9553..87b4624cea 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,9 @@ +2008-08-08 Joel Sherrill <joel.sherrill@OARcorp.com> + + * rtems/include/rtems.h, sapi/Makefile.am: Add Add simple helper to get + RTEMS version string. + * sapi/src/getversionstring.c: New file. + 2008-08-06 Brett Swimley <brett.swimley@aedbozeman.com> PR 1192/filesystem diff --git a/cpukit/rtems/include/rtems.h b/cpukit/rtems/include/rtems.h index 2cbfee49f0..b6befd87e0 100644 --- a/cpukit/rtems/include/rtems.h +++ b/cpukit/rtems/include/rtems.h @@ -68,6 +68,15 @@ extern "C" { #include <rtems/rtems/support.h> #include <rtems/score/sysstate.h> +/* + * Obtain the RTEMS Version String + * + * This method may be used to obtain the RTEMS version string. + * + * This method returns a pointer to the version string. + */ +const char *rtems_get_version_string(void); + #define RTEMS_HAS_HARDWARE_FP CPU_HARDWARE_FP /* diff --git a/cpukit/sapi/Makefile.am b/cpukit/sapi/Makefile.am index 8389d98732..34a011f989 100644 --- a/cpukit/sapi/Makefile.am +++ b/cpukit/sapi/Makefile.am @@ -26,7 +26,8 @@ AM_CPPFLAGS += -D__RTEMS_INSIDE__ noinst_LIBRARIES = libsapi.a libsapi_a_SOURCES = src/debug.c src/extension.c src/extensioncreate.c \ src/extensiondelete.c src/extensionident.c src/fatal.c src/exinit.c \ - src/io.c src/itronapi.c src/posixapi.c src/rtemsapi.c + src/io.c src/itronapi.c src/posixapi.c src/rtemsapi.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; +} |