Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1258, Add OS_StatusToString API #1259

Merged
merged 2 commits into from
Jun 22, 2022

Conversation

skliper
Copy link
Contributor

@skliper skliper commented May 27, 2022

Checklist (Please check before submitting)

Describe the contribution

Related to:

Testing performed
Added unit and functional tests, confirmed expected output

Expected behavior changes
None, just adds macro for future cleanup that will be Draco compliant

System(s) tested on

  • Hardware: i5/wsl
  • OS: Ubuntu 18.04
  • Versions: Bundle main + this commit

Additional context
See links above.

Third party code
None

Contributor Info - All information REQUIRED for consideration of pull request
Jacob Hageman - NASA/GSFC

@skliper skliper added the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label May 27, 2022
@skliper skliper added this to the Draco milestone May 27, 2022
@astrogeco astrogeco requested a review from jphickey June 1, 2022 16:16
@astrogeco
Copy link
Contributor

astrogeco commented Jun 1, 2022

CCB:2022-06-01 APPROVED

  • When we're ready to break Caelum compatibility we can add this API to prints
  • Plan is to follow this pattern in PSP and cFE

@astrogeco astrogeco added CCB:Approved Indicates code review and approval by community CCB and removed CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) labels Jun 1, 2022
src/os/shared/src/osapi-errors.c Fixed Show fixed Hide fixed
src/os/shared/src/osapi-errors.c Fixed Show fixed Hide fixed

if (status_string != NULL)
{
snprintf(*status_string, sizeof(*status_string), "%ld", OS_StatusToInteger(status));

Check warning

Code scanning / CodeQL-coding-standard

Unchecked return value

The return value of non-void function [snprintf](1) is not checked.

if (status_string != NULL)
{
snprintf(*status_string, sizeof(*status_string), "%ld", OS_StatusToInteger(status));

Check warning

Code scanning / CodeQL-coding-standard

Unchecked function argument

This use of parameter status has not been checked.
astrogeco added a commit that referenced this pull request Jun 10, 2022
astrogeco added a commit to nasa/cFS that referenced this pull request Jun 10, 2022
nasa/osal#1259, Add OS_StatusToString API
astrogeco added a commit to nasa/cFS that referenced this pull request Jun 22, 2022
*Combines:*

cFE  v7.0.0-rc4+dev143
osal osal v6.0.0-rc4+dev87
psp v1.6.0-rc4+dev

ci_lab v2.5.0-rc4+dev22
to_lab v2.5.0-rc4+dev21
sample_app v1.3.0-rc4+dev21

**Includes:**

- nasa/cFE#2119, Endian macro mask before shift to avoid shift overflow warning
- nasa/cFE#2115, Add macro for initializing command header

*Add StatusToString API*
- nasa/osal#1259, Add OS_StatusToString API
- nasa/PSP#347, Add CFE_PSP_StatusToString and CFE_PSP_STATUS_C
- nasa/cFE#2113, Add CFE_ES_StatusToString and CFE_STATUS_C

*Remove registration of empty EVS filters*
- nasa/ci_lab#111, Remove registration of empty EVS filters
- nasa/to_lab#122, Remove registration of empty EVS filters
- nasa/sample_app#175, Remove registration of empty event filters
astrogeco added a commit to nasa/cFS that referenced this pull request Jun 22, 2022
*Combines:*

cFE  v7.0.0-rc4+dev143
osal osal v6.0.0-rc4+dev87
psp v1.6.0-rc4+dev

ci_lab v2.5.0-rc4+dev22
to_lab v2.5.0-rc4+dev21
sample_app v1.3.0-rc4+dev21

**Includes:**

- nasa/cFE#2119, Endian macro mask before shift to avoid shift overflow warning
- nasa/cFE#2115, Add macro for initializing command header

*Add StatusToString API*
- nasa/osal#1259, Add OS_StatusToString API
- nasa/PSP#347, Add CFE_PSP_StatusToString and CFE_PSP_STATUS_C
- nasa/cFE#2113, Add CFE_ES_StatusToString and CFE_STATUS_C

*Remove registration of empty EVS filters*
- nasa/ci_lab#111, Remove registration of empty EVS filters
- nasa/to_lab#122, Remove registration of empty EVS filters
- nasa/sample_app#175, Remove registration of empty event filters

Co-authored-by: Jacob Hageman <skliper@users.noreply.github.com>
@astrogeco astrogeco merged commit 223a618 into nasa:main Jun 22, 2022
@skliper skliper deleted the fix1258-status_to_string branch September 19, 2022 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CCB:Approved Indicates code review and approval by community CCB draco-rc2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add OS_StatusToString API to support consistent status format representation in strings
2 participants