blob: 210677845ec365c70623de88ad1858481f43f6ef [file] [edit]
/*
* Copyright (C) 2017 Amlogic, Inc. All rights reserved.
* *
This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* *
This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
* *
You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* *
Description:
*/
#ifndef _FASTBOOT_H_
#define _FASTBOOT_H_
#include <lib/abr/abr.h>
#define RESPONSE_LEN (64 + 1)
void fastboot_fail(const char *s);
void fastboot_okay(const char *s);
int fastboot_get_var(char *cmd, char *response, size_t chars_left);
extern const char fastboot_getvar_list[][RESPONSE_LEN];
extern const size_t fastboot_getvar_list_size;
extern const char fastboot_getvar_list_dynamic[][RESPONSE_LEN];
extern const size_t fastboot_getvar_list_dynamic_size;
extern const char fastboot_getvar_list_ab[][RESPONSE_LEN];
extern const size_t fastboot_getvar_list_ab_size;
extern const char fastboot_getvar_list_ab_gbl_limited[][RESPONSE_LEN];
extern const size_t fastboot_getvar_list_ab_gbl_limited_size;
// Returns slot info for the given slot string "a" or "b", or NULL on failure.
// The returned struct is only valid until the next call to this function.
AbrSlotInfo *fastboot_get_slot_info(const char *suffix);
const char *parse_fb_cmd_partition(char *cmd);
#endif/*_FASTBOOT_H_*/