diff options
author | Mike Frysinger <vapier@chromium.org> | 2018-09-01 17:29:18 -0400 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-09-04 21:04:01 -0700 |
commit | 483fcf08acb9ad9bbedbb5f980314144260d5da4 (patch) | |
tree | cc44505da08c7a21ec675001bead117181658071 /firmware/include | |
parent | b7a007a22971e3a257b40844d4f685875ee56d5e (diff) | |
download | vboot-483fcf08acb9ad9bbedbb5f980314144260d5da4.tar.gz |
add extern C markers to installed headers
Some of the headers have extern C markings already, so add to the
rest of the installed files so users don't have to.
BUG=chromium:878440
TEST=build passes
BRANCH=none
Change-Id: I3edf56ca2235269803049207806a9f7eb4c664f2
Reviewed-on: https://chromium-review.googlesource.com/1201042
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'firmware/include')
-rw-r--r-- | firmware/include/bmpblk_header.h | 8 | ||||
-rw-r--r-- | firmware/include/gbb_access.h | 8 | ||||
-rw-r--r-- | firmware/include/gpt.h | 8 | ||||
-rw-r--r-- | firmware/include/gpt_misc.h | 8 | ||||
-rw-r--r-- | firmware/include/tpm1_tss_constants.h | 8 | ||||
-rw-r--r-- | firmware/include/tpm2_marshaling.h | 8 | ||||
-rw-r--r-- | firmware/include/tpm2_tss_constants.h | 8 | ||||
-rw-r--r-- | firmware/include/vboot_api.h | 9 | ||||
-rw-r--r-- | firmware/include/vboot_struct.h | 8 |
9 files changed, 73 insertions, 0 deletions
diff --git a/firmware/include/bmpblk_header.h b/firmware/include/bmpblk_header.h index a010f071..fec309d8 100644 --- a/firmware/include/bmpblk_header.h +++ b/firmware/include/bmpblk_header.h @@ -45,6 +45,10 @@ #define VBOOT_REFERENCE_BMPBLK_HEADER_H_ #include <stdint.h> +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + #define BMPBLOCK_SIGNATURE "$BMP" #define BMPBLOCK_SIGNATURE_SIZE (4) @@ -138,4 +142,8 @@ typedef enum ImageFormat { #define RENDER_HWID "$HWID" #define RENDER_HWID_RTOL "$HWID.rtol" +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* VBOOT_REFERENCE_BMPBLK_HEADER_H_ */ diff --git a/firmware/include/gbb_access.h b/firmware/include/gbb_access.h index 4842563b..09a88fa0 100644 --- a/firmware/include/gbb_access.h +++ b/firmware/include/gbb_access.h @@ -10,6 +10,10 @@ #include "vboot_api.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + struct vb2_context; struct VbPublicKey; @@ -47,4 +51,8 @@ VbError_t VbGbbReadRecoveryKey(struct vb2_context *ctx, */ VbError_t VbGbbReadHWID(struct vb2_context *ctx, char *hwid, uint32_t max_size); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif diff --git a/firmware/include/gpt.h b/firmware/include/gpt.h index 45702372..0f27cef5 100644 --- a/firmware/include/gpt.h +++ b/firmware/include/gpt.h @@ -11,6 +11,10 @@ #define VBOOT_REFERENCE_CGPTLIB_GPT_H_ #include <stdint.h> +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + /* From the specification */ #define GPT_HEADER_SIGNATURE_SIZE 8 #define GPT_HEADER_REVISION 0x00010000 @@ -124,4 +128,8 @@ typedef struct { #define GPTENTRY_EXPECTED_SIZE 128 +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* VBOOT_REFERENCE_CGPTLIB_GPT_H_ */ diff --git a/firmware/include/gpt_misc.h b/firmware/include/gpt_misc.h index 7c4367b8..b3b062b1 100644 --- a/firmware/include/gpt_misc.h +++ b/firmware/include/gpt_misc.h @@ -9,6 +9,10 @@ #include "gpt.h" #include "vboot_api.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + enum { GPT_SUCCESS = 0, GPT_ERROR_NO_VALID_KERNEL, @@ -209,4 +213,8 @@ void SetEntrySuccessful(GptEntry *e, int successful); void SetEntryPriority(GptEntry *e, int priority); void SetEntryTries(GptEntry *e, int tries); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* VBOOT_REFERENCE_CGPT_MISC_H_ */ diff --git a/firmware/include/tpm1_tss_constants.h b/firmware/include/tpm1_tss_constants.h index 54642ba6..8d92bef2 100644 --- a/firmware/include/tpm1_tss_constants.h +++ b/firmware/include/tpm1_tss_constants.h @@ -11,6 +11,10 @@ #include <stdint.h> +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + #define TPM_MAX_COMMAND_SIZE 4096 #define TPM_LARGE_ENOUGH_COMMAND_SIZE 256 /* saves space in the firmware */ #define TPM_PUBEK_SIZE 256 @@ -251,4 +255,8 @@ typedef struct tdTPM_NV_AUTH_POLICY #define TPM_ORD_Startup ((uint32_t) 0x00000099) #define TPM_ORD_TakeOwnership ((uint32_t) 0x0000000D) +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* ! __VBOOT_REFERENCE_FIRMWARE_INCLUDE_TPM1_TSS_CONSTANTS_H */ diff --git a/firmware/include/tpm2_marshaling.h b/firmware/include/tpm2_marshaling.h index 3ebea388..929f0fcd 100644 --- a/firmware/include/tpm2_marshaling.h +++ b/firmware/include/tpm2_marshaling.h @@ -8,6 +8,10 @@ #include "tss_constants.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + /* The below functions are used to serialize/deserialize TPM2 commands. */ /** @@ -86,4 +90,8 @@ void tpm_set_ph_disabled(int flag); */ int tpm_is_ph_disabled(void); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif // __SRC_LIB_TPM2_MARSHALING_H diff --git a/firmware/include/tpm2_tss_constants.h b/firmware/include/tpm2_tss_constants.h index 84ad05b7..4249cf04 100644 --- a/firmware/include/tpm2_tss_constants.h +++ b/firmware/include/tpm2_tss_constants.h @@ -10,6 +10,10 @@ #ifndef __VBOOT_REFERENCE_FIRMWARE_INCLUDE_TPM2_TSS_CONSTANTS_H #define __VBOOT_REFERENCE_FIRMWARE_INCLUDE_TPM2_TSS_CONSTANTS_H +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + #define TPM_BUFFER_SIZE 256 /* Tpm2 command tags. */ @@ -295,4 +299,8 @@ typedef struct tdTPM_IFX_FIELDUPGRADEINFO #define TPM_MAX_COMMAND_SIZE 4096 #define TPM_PCR_DIGEST 32 +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* ! __VBOOT_REFERENCE_FIRMWARE_INCLUDE_TPM2_TSS_CONSTANTS_H */ diff --git a/firmware/include/vboot_api.h b/firmware/include/vboot_api.h index 55c3d02a..33b997f8 100644 --- a/firmware/include/vboot_api.h +++ b/firmware/include/vboot_api.h @@ -26,6 +26,10 @@ #include "gpt.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + /*****************************************************************************/ /* Error codes */ @@ -985,4 +989,9 @@ uint8_t VbExOverrideGptEntryPriority(const GptEntry *e); * @return VBERROR_... error, VBERROR_SUCCESS on success. */ VbError_t VbExGetLocalizationCount(uint32_t *count); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* VBOOT_REFERENCE_VBOOT_API_H_ */ diff --git a/firmware/include/vboot_struct.h b/firmware/include/vboot_struct.h index c1afd8cd..fc993712 100644 --- a/firmware/include/vboot_struct.h +++ b/firmware/include/vboot_struct.h @@ -10,6 +10,10 @@ #define VBOOT_REFERENCE_VBOOT_STRUCT_H_ #include <stdint.h> +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + /* Public key data */ typedef struct VbPublicKey { /* Offset of key data from start of this struct */ @@ -495,4 +499,8 @@ typedef struct VbSharedDataHeader { #define VB_SHARED_DATA_VERSION 2 /* Version for struct_version */ +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* VBOOT_REFERENCE_VBOOT_STRUCT_H_ */ |