]>
git.ipfire.org Git - thirdparty/u-boot.git/blob - include/bcb.h
1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2020 Eugeniu Rosca <rosca.eugeniu@gmail.com>
5 * Android Bootloader Control Block Header
20 #if IS_ENABLED(CONFIG_CMD_BCB)
22 int bcb_find_partition_and_load(const char *iface
,
23 int devnum
, char *partp
);
24 int bcb_load(struct blk_desc
*block_description
,
25 struct disk_partition
*disk_partition
);
26 int bcb_set(enum bcb_field field
, const char *value
);
29 * bcb_get() - get the field value.
30 * @field: field to get
31 * @value_out: buffer to copy bcb field value to
32 * @value_size: buffer size to avoid overflow in case
33 * value_out is smaller then the field value
35 int bcb_get(enum bcb_field field
, char *value_out
, size_t value_size
);
42 #include <linux/errno.h>
44 static inline int bcb_load(struct blk_desc
*block_description
,
45 struct disk_partition
*disk_partition
)
50 static inline int bcb_find_partition_and_load(const char *iface
,
51 int devnum
, char *partp
)
56 static inline int bcb_set(enum bcb_field field
, const char *value
)
61 static inline int bcb_get(enum bcb_field field
, char *value_out
)
66 static inline int bcb_store(void)
71 static inline void bcb_reset(void)
76 #endif /* __BCB_H__ */