[PATCH] Add rtems_board_support_package()

Joel Sherrill joel at rtems.org
Wed Mar 13 13:39:20 UTC 2019


On Wed, Mar 13, 2019 at 2:38 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> What about this patch? The placement of rtems_board_support_package()
> into <rtems/version.h> is a bit odd, but I think it fits into the scope
> of these functions. You normally include <rtems/version.h> if you want
> to print some system information. Another place would be <rtems.h> right
> after rtems_get_version_string().
>

I think it is OK although I agree with you it is odd.

If these are intended to be public APIs, I do not see any documentation for
them in rtems-docs.

>
> On 01/02/2019 08:05, Sebastian Huber wrote:
> > ---
> >   bsps/shared/rtems-version.c           | 6 ++++++
> >   cpukit/include/rtems/version.h        | 7 +++++++
> >   testsuites/sptests/spversion01/init.c | 1 +
> >   3 files changed, 14 insertions(+)
> >
> > diff --git a/bsps/shared/rtems-version.c b/bsps/shared/rtems-version.c
> > index 16f74070bc..99b98966e6 100644
> > --- a/bsps/shared/rtems-version.c
> > +++ b/bsps/shared/rtems-version.c
> > @@ -7,6 +7,7 @@
> >    *  http://www.rtems.org/license/LICENSE.
> >    */
> >
> > +#include <rtems/version.h>
> >   #include <rtems/system.h>
> >
> >   #include <bspopts.h>
> > @@ -27,3 +28,8 @@
> >   const char _RTEMS_version[] =
> >     "rtems-" RTEMS_VERSION " (" CPU_NAME "/" CPU_MODEL_NAME "/"
> >     RTEMS_XSTRING( RTEMS_BSP ) ")";
> > +
> > +const char *rtems_board_support_package( void )
> > +{
> > +  return RTEMS_XSTRING( RTEMS_BSP );
> > +}
> > diff --git a/cpukit/include/rtems/version.h
> b/cpukit/include/rtems/version.h
> > index b806cb8c2f..9bee2e8d10 100644
> > --- a/cpukit/include/rtems/version.h
> > +++ b/cpukit/include/rtems/version.h
> > @@ -67,6 +67,13 @@ int rtems_version_revision( void );
> >    */
> >   const char *rtems_version_control_key( void );
> >
> > +/**
> > + * @brief Returns the board support package name.
> > + *
> > + * @return The board support package name.
> > + */
> > +const char *rtems_board_support_package( void );
> > +
> >   /** @} */
> >
> >   #ifdef __cplusplus
> > diff --git a/testsuites/sptests/spversion01/init.c
> b/testsuites/sptests/spversion01/init.c
> > index f4edcb2cdc..fc38577691 100644
> > --- a/testsuites/sptests/spversion01/init.c
> > +++ b/testsuites/sptests/spversion01/init.c
> > @@ -29,6 +29,7 @@ static rtems_task Init(
> >     printf("Minor    : %d\n", rtems_version_minor());
> >     printf("Revision : %d\n", rtems_version_revision());
> >     printf("VC Key   : %s\n", rtems_version_control_key());
> > +  printf("BSP      : %s\n", rtems_board_support_package());
> >
> >     TEST_END();
> >
>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax     : +49 89 189 47 41-09
> E-Mail  : sebastian.huber at embedded-brains.de
> PGP     : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20190313/b9e0bcae/attachment-0002.html>


More information about the devel mailing list