Merge "Avoid logging in fork_sysreq_reboot failsafe thread"

This commit is contained in:
Zuul 2023-01-10 16:53:51 +00:00 committed by Gerrit Code Review
commit 68452f367b

View File

@ -1030,7 +1030,7 @@ void fork_sysreq_reboot ( int delay_in_secs )
setup_child ( false ) ;
ilog ("*** Failsafe Reset Thread ***\n");
dlog ("*** Failsafe Reset Thread ***\n");
/* Commented this out because blocking SIGTERM in systemd environment
* causes any processes that spawn this sysreq will stall shutdown
@ -1046,7 +1046,7 @@ void fork_sysreq_reboot ( int delay_in_secs )
sysrq_handler_fd = open( "/proc/sys/kernel/sysrq", O_RDWR | O_CLOEXEC );
if( 0 > sysrq_handler_fd )
{
ilog ( "failed sysrq_handler open\n");
elog ( "failed sysrq_handler open\n");
return ;
}
@ -1059,7 +1059,7 @@ void fork_sysreq_reboot ( int delay_in_secs )
{
if ( 0 == (i % 5) )
{
ilog ( "sysrq reset in %d seconds\n", i );
dlog ( "sysrq reset in %d seconds\n", i );
}
}
}
@ -1068,14 +1068,14 @@ void fork_sysreq_reboot ( int delay_in_secs )
sysrq_tigger_fd = open( "/proc/sysrq-trigger", O_RDWR | O_CLOEXEC );
if( 0 > sysrq_tigger_fd )
{
ilog ( "failed sysrq_trigger open\n");
elog ( "failed sysrq_trigger open\n");
return ;
}
temp = write( sysrq_tigger_fd, "b", 1 );
close( sysrq_tigger_fd );
ilog ( "sysreq rc:%ld\n", temp );
dlog ( "sysreq rc:%ld\n", temp );
UNUSED(temp);