diff options
author | Bill Richardson <wfrichar@chromium.org> | 2015-03-26 16:34:28 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-03-31 06:28:18 +0000 |
commit | 1e35c3a51176edbe924acb8b9bcb68ae7b155ab4 (patch) | |
tree | 49d1af5d7f0592481e78e87d614d3735c852d16f /futility/futility_options.h | |
parent | 453ecd19560af8efe3e518ba745dc6e8bfecac90 (diff) | |
download | vboot-1e35c3a51176edbe924acb8b9bcb68ae7b155ab4.tar.gz |
futility: export options for the sign and show commands
This declares the options for the sign and show commands in a
header file.
We want to split the code for logically separate file types into
separate source files, but we don't want to have multiple
option-parsing routines, so that we can be sure we're using the
same option names consistently (for example, --hash_alg always
takes the same args and means the same thing).
BUG=chromium:231574
BRANCH=none
TEST=make runtests
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Change-Id: I939bd19ba199b4c44eb41cff3571cff88df9a181
Reviewed-on: https://chromium-review.googlesource.com/262896
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'futility/futility_options.h')
-rw-r--r-- | futility/futility_options.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/futility/futility_options.h b/futility/futility_options.h new file mode 100644 index 00000000..3d416d5b --- /dev/null +++ b/futility/futility_options.h @@ -0,0 +1,59 @@ +/* + * Copyright 2015 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/* + * We centralize option parsing but may split operations into multiple files, + * so let's declare the option structures in a single place (here). + */ + +#ifndef VBOOT_REFERENCE_FUTILITY_OPTIONS_H_ +#define VBOOT_REFERENCE_FUTILITY_OPTIONS_H_ +#include <stdint.h> +#include "vboot_common.h" + +struct show_option_s { + VbPublicKey *k; + uint8_t *fv; + uint64_t fv_size; + uint32_t padding; + int strict; + int t_flag; + enum futil_file_type type; +}; +extern struct show_option_s show_option; + +struct sign_option_s { + VbPrivateKey *signprivate; + VbKeyBlockHeader *keyblock; + VbPublicKey *kernel_subkey; + VbPrivateKey *devsignprivate; + VbKeyBlockHeader *devkeyblock; + uint32_t version; + int version_specified; + uint32_t flags; + int flags_specified; + char *loemdir; + char *loemid; + uint8_t *bootloader_data; + uint64_t bootloader_size; + uint8_t *config_data; + uint64_t config_size; + enum arch_t arch; + int fv_specified; + uint32_t kloadaddr; + uint32_t padding; + int vblockonly; + char *outfile; + int create_new_outfile; + char *pem_signpriv; + int pem_algo_specified; + uint32_t pem_algo; + char *pem_external; + enum futil_file_type type; +}; +extern struct sign_option_s sign_option; + +#endif /* VBOOT_REFERENCE_FUTILITY_OPTIONS_H_ */ |