{% local state = (OptionResult == 0 and (TimesResultWithout == 0 or TimesResultWith == 0))
    and 'successfully' or 'failed' %}
Set boot device {*state*}.