1
2
3
4
5
6#ifdef AVB_INSIDE_LIBAVB_H
7#error "You can't include avb_sha.h in the public header libavb.h."
8#endif
9
10#ifndef AVB_COMPILATION
11#error "Never include this file, it may only be used from internal avb code."
12#endif
13
14#ifndef AVB_CMDLINE_H_
15#define AVB_CMDLINE_H_
16
17#include "avb_ops.h"
18#include "avb_slot_verify.h"
19
20
21
22
23#define AVB_PART_NAME_MAX_SIZE 32
24
25#define AVB_MAX_NUM_CMDLINE_SUBST 10
26
27
28typedef struct AvbCmdlineSubstList {
29 size_t size;
30 char* tokens[AVB_MAX_NUM_CMDLINE_SUBST];
31 char* values[AVB_MAX_NUM_CMDLINE_SUBST];
32} AvbCmdlineSubstList;
33
34
35
36
37
38char* avb_sub_cmdline(AvbOps* ops,
39 const char* cmdline,
40 const char* ab_suffix,
41 bool using_boot_for_vbmeta,
42 const AvbCmdlineSubstList* additional_substitutions);
43
44AvbSlotVerifyResult avb_append_options(
45 AvbOps* ops,
46 AvbSlotVerifyFlags flags,
47 AvbSlotVerifyData* slot_data,
48 AvbVBMetaImageHeader* toplevel_vbmeta,
49 AvbAlgorithmType algorithm_type,
50 AvbHashtreeErrorMode hashtree_error_mode,
51 AvbHashtreeErrorMode resolved_hashtree_error_mode);
52
53
54
55
56AvbCmdlineSubstList* avb_new_cmdline_subst_list(void);
57
58
59void avb_free_cmdline_subst_list(AvbCmdlineSubstList* cmdline_subst);
60
61
62
63
64
65
66
67AvbSlotVerifyResult avb_add_root_digest_substitution(
68 const char* part_name,
69 const uint8_t* digest,
70 size_t digest_size,
71 AvbCmdlineSubstList* out_cmdline_subst);
72
73#endif
74