Merge "Avoid logging in fork_sysreq_reboot failsafe thread"
This commit is contained in:
commit
68452f367b
@ -1030,7 +1030,7 @@ void fork_sysreq_reboot ( int delay_in_secs )
|
|||||||
|
|
||||||
setup_child ( false ) ;
|
setup_child ( false ) ;
|
||||||
|
|
||||||
ilog ("*** Failsafe Reset Thread ***\n");
|
dlog ("*** Failsafe Reset Thread ***\n");
|
||||||
|
|
||||||
/* Commented this out because blocking SIGTERM in systemd environment
|
/* Commented this out because blocking SIGTERM in systemd environment
|
||||||
* causes any processes that spawn this sysreq will stall shutdown
|
* 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 );
|
sysrq_handler_fd = open( "/proc/sys/kernel/sysrq", O_RDWR | O_CLOEXEC );
|
||||||
if( 0 > sysrq_handler_fd )
|
if( 0 > sysrq_handler_fd )
|
||||||
{
|
{
|
||||||
ilog ( "failed sysrq_handler open\n");
|
elog ( "failed sysrq_handler open\n");
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1059,7 +1059,7 @@ void fork_sysreq_reboot ( int delay_in_secs )
|
|||||||
{
|
{
|
||||||
if ( 0 == (i % 5) )
|
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 );
|
sysrq_tigger_fd = open( "/proc/sysrq-trigger", O_RDWR | O_CLOEXEC );
|
||||||
if( 0 > sysrq_tigger_fd )
|
if( 0 > sysrq_tigger_fd )
|
||||||
{
|
{
|
||||||
ilog ( "failed sysrq_trigger open\n");
|
elog ( "failed sysrq_trigger open\n");
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp = write( sysrq_tigger_fd, "b", 1 );
|
temp = write( sysrq_tigger_fd, "b", 1 );
|
||||||
close( sysrq_tigger_fd );
|
close( sysrq_tigger_fd );
|
||||||
|
|
||||||
ilog ( "sysreq rc:%ld\n", temp );
|
dlog ( "sysreq rc:%ld\n", temp );
|
||||||
|
|
||||||
UNUSED(temp);
|
UNUSED(temp);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user