diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-09-10 09:21:11 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-09-11 07:28:34 +0200 |
commit | c1a1f2c8da4993b03f0a8fadac8f0521df48abec (patch) | |
tree | 598a1ceae0343d42a31031fc21c79eee53cc02ac /cpukit/include/rtems/version.h | |
parent | Add psxfenv01 test to psxtests (diff) | |
download | rtems-c1a1f2c8da4993b03f0a8fadac8f0521df48abec.tar.bz2 |
Add rtems_version_control_key_is_valid()
Diffstat (limited to 'cpukit/include/rtems/version.h')
-rw-r--r-- | cpukit/include/rtems/version.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/cpukit/include/rtems/version.h b/cpukit/include/rtems/version.h index 30dd70cc21..a8aff732f3 100644 --- a/cpukit/include/rtems/version.h +++ b/cpukit/include/rtems/version.h @@ -16,6 +16,8 @@ #ifndef _RTEMS_VERSION_H #define _RTEMS_VERSION_H +#include <stdbool.h> + #ifdef __cplusplus extern "C" { #endif @@ -65,12 +67,25 @@ int rtems_version_revision( void ); * The key is specific to the version control system being used and allows the * built version to be identified. * - * @return The version control key or the empty string if no version control - * key is available. + * Use rtems_version_control_key_is_valid() to check if the version control key + * is valid. + * + * @return The version control key. */ const char *rtems_version_control_key( void ); /** + * @brief Returns true, if the version control key is valid, otherwise false. + * + * @retval true The version control key is valid. + * @retval false Otherwise. + */ +static inline bool rtems_version_control_key_is_valid( const char *key ) +{ + return key[ 0 ] != '\0'; +} + +/** * @brief Returns the board support package name. * * @return The board support package name. |