anchor.diff:  %% @end
   %%--------------------------------------------------------------------
   stopped(tick, State = #state{uuid = UUID}) ->
  -    lager:info("[zlogin:~s] tick", [UUID]),
       ConsolePort = open_zlogin(State),
       receive
           {'EXIT', ConsolePort, _PosixCode} ->
               tick(),
  -            lager:info("[zlogin:~s] failed to login.", [UUID]),
               {next_state, stopped, State}
       after
           200 ->
  
positive.code: tick() ->
      gen_fsm:send_event_after(1000, tick).
  
  %%--------------------------------------------------------------------
  %% @private
  %% @doc
  
negative.code:             {next_state, connected, State1}
      end;
  
  stopped(check, State = #state{uuid = UUID}) ->
      case fifo_cmd:run("/usr/sbin/zoneadm", [{z, UUID}, "list"]) of
          {ok, _} ->
              check(),
              {next_state, stopped, State};
          _ ->
              lager:info("[zlogin:~s] shutting down since check failed.", [UUID]),
              {stop, normal, State}
      end;
  
  
  stopped({send, Data}, State = #state{uuid = UUID}) ->
      lager:info("[~s] ! < ~s", [UUID, Data]),
      {next_state, stopped, State}.
  