Ejemplo n.º 1
0
static int remove_variables(sd_id128_t uuid, const char *path, bool in_order) {
        uint16_t slot;
        int r;

        if (!is_efi_boot())
                return 0;

        r = find_slot(uuid, path, &slot);
        if (r != 1)
                return 0;

        r = efi_remove_boot_option(slot);
        if (r < 0)
                return r;

        if (in_order)
                return remove_from_order(slot);
        else
                return 0;
}
Ejemplo n.º 2
0
void game_t::unmatched_line(Fl_Color color)
{
    if (color == cur_line_color) {
        cur_line_color = BOARD_EMPTY;
        cur_line_len = -1;
    } else if (color == my_color) {
        state = STATE_LOST;
        gameover_func(gui_obj, STATE_LOST);
    } else {
        Fl_Color new_follow_color = remove_from_order(color);
        most_recent_color = i_follow_color;
        if (i_follow_color == color) {
            i_follow_color = new_follow_color;
        }
        if (num_in_order == 1) {
            if (order[0] == my_color) {
                state = STATE_WON;
            } else {
                state = STATE_OVER;
            }
            gameover_func(gui_obj, state);
        }
    }
}