Commit 5d54f373 authored by David Johnson's avatar David Johnson
Browse files

Split out a ResetNextOpMode method from OSSelect (which now calls it).

This allows other things that don't need to change the OS, but *do* need
to make sure that a mode transition gets setup if necessary, to setup that
transition too.  Currently the only case that needs this is push-based
reloads, when the reload has been setup (and then not performed because it
was optimized away).
parent bf0c2929
......@@ -2607,6 +2607,22 @@ sub OSSelect($$$$)
"where node_id='$nodeid'")
or return -1;
return -1
if ($self->ResetNextOpMode($debug) < 0);
return Refresh($self);
sub ResetNextOpMode($$)
my ($self,$debug) = @_;
my $nodeid = $self->node_id();
my $curmode = $self->op_mode();
# Why? When will this happen?
return 0
if (!$curmode);
# Determine what osid the node will now boot. We need to know this so we
# can set the next opmode. This call has to return *something* or we are
......@@ -2633,7 +2649,7 @@ sub OSSelect($$$$)
"where node_id='$nodeid'")
or return -1;
return Refresh($self);
return 0;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment