Skip to content

Commit

Permalink
Merge pull request #388 from thnkslprpt/fix-387-update-function-names…
Browse files Browse the repository at this point in the history
…-to-use-__func__

Fix #387, Replace hand-written function names with __func__
  • Loading branch information
dmknutsen authored Dec 14, 2023
2 parents 71ee927 + 720166a commit 24849bb
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion fsw/mcp750-vxworks/src/cfe_psp_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void CFE_PSP_Restart(uint32 reset_type)

void CFE_PSP_Panic(int32 ErrorCode)
{
printf("CFE_PSP_Panic Called with error code = 0x%08X. Exiting.\n", (unsigned int)ErrorCode);
printf("%s called with error code = 0x%08X. Exiting.\n", __func__, (unsigned int)ErrorCode);
exit(-1); /* Need to improve this */
}

Expand Down
2 changes: 1 addition & 1 deletion fsw/pc-linux/src/cfe_psp_exception.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void CFE_PSP_AttachExceptions(void)
*/
backtrace(Addr, 1);

OS_printf("CFE_PSP: CFE_PSP_AttachExceptions Called\n");
OS_printf("CFE_PSP: %s called\n", __func__);

/*
* Block most other signals during handler execution.
Expand Down
4 changes: 2 additions & 2 deletions fsw/pc-linux/src/cfe_psp_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void CFE_PSP_Restart(uint32 reset_type)

void CFE_PSP_Panic(int32 ErrorCode)
{
OS_printf("CFE_PSP_Panic Called with error code = 0x%08X. Exiting.\n", (unsigned int)ErrorCode);
OS_printf("%s called with error code = 0x%08X. Exiting.\n", __func__, (unsigned int)ErrorCode);
OS_printf("The cFE could not start.\n");
abort(); /* abort() is preferable to exit(-1), as it may create a core file for debug */
}
Expand All @@ -147,7 +147,7 @@ void CFE_PSP_Panic(int32 ErrorCode)
*/
void CFE_PSP_FlushCaches(uint32 type, void *address, uint32 size)
{
printf("CFE_PSP_FlushCaches called -- Currently no Linux/OSX/Cygwin implementation\n");
printf("%s called -- Currently no Linux/OSX/Cygwin implementation\n", __func__);
}

/*
Expand Down
2 changes: 1 addition & 1 deletion fsw/pc-rtems/src/cfe_psp_exception.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
*/
void CFE_PSP_AttachExceptions(void)
{
OS_printf("CFE_PSP: CFE_PSP_AttachExceptions Called\n");
OS_printf("CFE_PSP: %s called\n", __func__);
CFE_PSP_Exception_Reset();
}

Expand Down
4 changes: 2 additions & 2 deletions fsw/pc-rtems/src/cfe_psp_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ extern CFE_PSP_MemoryBlock_t PcRtems_ReservedMemBlock;
void CFE_PSP_Restart(uint32 reset_type)
{
CFE_PSP_FlushCaches(1, PcRtems_ReservedMemBlock.BlockPtr, PcRtems_ReservedMemBlock.BlockSize);
OS_printf("CFE_PSP_Restart is not implemented on this platform ( yet ! )\n");
OS_printf("%s is not implemented on this platform ( yet ! )\n", __func__);
exit(-1);
}

Expand All @@ -99,7 +99,7 @@ void CFE_PSP_Restart(uint32 reset_type)

void CFE_PSP_Panic(int32 ErrorCode)
{
printf("CFE_PSP_Panic Called with error code = 0x%08X. Exiting.\n", (unsigned int)ErrorCode);
printf("%s called with error code = 0x%08X. Exiting.\n", __func__, (unsigned int)ErrorCode);
OS_ApplicationExit(ErrorCode);
}

Expand Down

0 comments on commit 24849bb

Please sign in to comment.