source: rtems/cpukit/include/rtems/version.h @ eaa415b2

5
Last change on this file since eaa415b2 was eaa415b2, checked in by Sebastian Huber <sebastian.huber@…>, on 09/06/19 at 12:31:32

rtems: Make rtems_version_control_key() safer

Return the empty string instead of a NULL pointer if no version key is
available.

  • Property mode set to 100644
File size: 1.7 KB
Line 
1/**
2 * @file
3 *
4 * @brief Version API.
5 */
6
7/*
8 *  Copyright (C) 2017.
9 *  Chris Johns <chrisj@rtems.org>
10 *
11 *  The license and distribution terms for this file may be
12 *  found in the file LICENSE in this distribution or at
13 *  http://www.rtems.org/license/LICENSE.
14 */
15
16#ifndef _RTEMS_VERSION_H
17#define _RTEMS_VERSION_H
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23/**
24 * @defgroup RTEMSAPIClassicVersion Version
25 *
26 * @ingroup RTEMSAPIClassic
27 *
28 * @brief The Version API provides functions to return the version or parts of
29 * the version of RTEMS you are using.
30 */
31/**@{**/
32
33/**
34 * @brief Returns the version string.
35 *
36 * @retval text The version as a string.
37 */
38const char *rtems_version( void );
39
40/**
41 * @brief Returns the version's major number.
42 *
43 * @retval int The version's major number.
44 */
45int rtems_version_major( void );
46
47/**
48 * @brief Returns the version's minor number.
49 *
50 * @retval int The version's minor number.
51 */
52int rtems_version_minor( void );
53
54/**
55 * @brief Returns the version's revision number.
56 *
57 * @retval int The version's revision number.
58 */
59int rtems_version_revision( void );
60
61/**
62 * @brief Returns the version control key for the current version of code that
63 * has been built.
64 *
65 * The key is specific to the version control system being used and allows the
66 * built version to be identified.
67 *
68 * @return The version control key or the empty string if no version control
69 * key is available.
70 */
71const char *rtems_version_control_key( void );
72
73/**
74 * @brief Returns the board support package name.
75 *
76 * @return The board support package name.
77 */
78const char *rtems_board_support_package( void );
79
80/** @} */
81
82#ifdef __cplusplus
83}
84#endif
85
86#endif
87/* end of include file */
Note: See TracBrowser for help on using the repository browser.