diff options
author | Joel Kitching <kitching@google.com> | 2018-08-02 16:21:17 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-08-03 01:31:21 -0700 |
commit | 9ad8a41b8cedef9ac1f0513992ce6958eb86c257 (patch) | |
tree | 2a1fe0e028829dc579840dce386047ce661ac6d3 /host | |
parent | c239374ac3e1af342c10f4f3244bc98d76c2413a (diff) | |
download | vboot-9ad8a41b8cedef9ac1f0513992ce6958eb86c257.tar.gz |
vboot: bulk fix tabs and spacing inconsistency
Problem files were found with:
find . -name '*.c' -o -name '*.h' | xargs grep '^ [^*]'
and edited manually.
Ignores utility/ and cgpt/, since they seem to globally adhere
to a two-space tab convention.
BUG=None
TEST=make clean runtests
TEST=emerge vboot_reference depthcharge
Change-Id: I5a678484a119c8f1911f717e1968bdb4f1a0810f
Reviewed-on: https://chromium-review.googlesource.com/1160131
Commit-Ready: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'host')
-rw-r--r-- | host/arch/x86/lib/crossystem_arch.c | 10 | ||||
-rw-r--r-- | host/include/cgpt_params.h | 2 | ||||
-rw-r--r-- | host/include/crossystem.h | 2 | ||||
-rw-r--r-- | host/include/vboot_host.h | 2 | ||||
-rw-r--r-- | host/lib/crossystem.c | 39 | ||||
-rw-r--r-- | host/lib/host_keyblock.c | 8 | ||||
-rw-r--r-- | host/lib/include/host_misc.h | 4 | ||||
-rw-r--r-- | host/lib/include/signature_digest.h | 4 | ||||
-rw-r--r-- | host/lib/signature_digest.c | 4 |
9 files changed, 37 insertions, 38 deletions
diff --git a/host/arch/x86/lib/crossystem_arch.c b/host/arch/x86/lib/crossystem_arch.c index 284b75d2..81cc281d 100644 --- a/host/arch/x86/lib/crossystem_arch.c +++ b/host/arch/x86/lib/crossystem_arch.c @@ -481,7 +481,7 @@ static int VbGetRecoveryReason(void) * exactly one match for that, we're SOL. */ static int FindGpioChipOffset(unsigned *gpio_num, unsigned *offset, - const char *name) + const char *name) { DIR *dir; struct dirent *ent; @@ -508,7 +508,7 @@ static int FindGpioChipOffset(unsigned *gpio_num, unsigned *offset, * a 'label' file inside of it to find the expected the controller name. */ static int FindGpioChipOffsetByLabel(unsigned *gpio_num, unsigned *offset, - const char *name) + const char *name) { DIR *dir; struct dirent *ent; @@ -618,7 +618,7 @@ static int FindGpioChipOffsetByNumber(unsigned *gpio_num, unsigned *offset, * 4 | 0x18000 */ static int BraswellFindGpioChipOffset(unsigned *gpio_num, unsigned *offset, - const char *name) + const char *name) { static Basemapping data[]={ {0x20000, 0}, @@ -641,7 +641,7 @@ static int BraswellFindGpioChipOffset(unsigned *gpio_num, unsigned *offset, * 3 | 0x2000 */ static int BayTrailFindGpioChipOffset(unsigned *gpio_num, unsigned *offset, - const char *name) + const char *name) { static Basemapping data[]={ {0x3000, 0}, @@ -860,7 +860,7 @@ int VbGetArchPropertyInt(const char* name) const char* VbGetArchPropertyString(const char* name, char* dest, - size_t size) + size_t size) { unsigned value; diff --git a/host/include/cgpt_params.h b/host/include/cgpt_params.h index 431443b9..7c4a4b29 100644 --- a/host/include/cgpt_params.h +++ b/host/include/cgpt_params.h @@ -85,7 +85,7 @@ typedef struct CgptPrioritizeParams { struct CgptFindParams; typedef void (*CgptFindShowFn)(struct CgptFindParams *params, char *filename, - int partnum, GptEntry *entry); + int partnum, GptEntry *entry); typedef struct CgptFindParams { char *drive_name; uint64_t drive_size; diff --git a/host/include/crossystem.h b/host/include/crossystem.h index 25b9cc0b..42b1b040 100644 --- a/host/include/crossystem.h +++ b/host/include/crossystem.h @@ -30,7 +30,7 @@ int VbGetSystemPropertyInt(const char* name); * * Returns the passed buffer, or NULL if error. */ const char* VbGetSystemPropertyString(const char* name, char* dest, - size_t size); + size_t size); /* Sets a system property integer. * diff --git a/host/include/vboot_host.h b/host/include/vboot_host.h index 4b5db67e..9ebe4040 100644 --- a/host/include/vboot_host.h +++ b/host/include/vboot_host.h @@ -55,7 +55,7 @@ int GuidIsZero(const Guid *guid); /* Returns a new copy of the kernel cmdline. The caller must free it. */ char *FindKernelConfig(const char *filename, - uint64_t kernel_body_load_address); + uint64_t kernel_body_load_address); /****************************************************************************/ /* Kernel partition */ diff --git a/host/lib/crossystem.c b/host/lib/crossystem.c index 0df67629..e41815ec 100644 --- a/host/lib/crossystem.c +++ b/host/lib/crossystem.c @@ -213,7 +213,7 @@ int VbGetCrosDebug(void) } char *GetVdatLoadFirmwareDebug(char *dest, int size, - const VbSharedDataHeader *sh) + const VbSharedDataHeader *sh) { snprintf(dest, size, "Check A result=%d\n" @@ -232,7 +232,7 @@ char *GetVdatLoadFirmwareDebug(char *dest, int size, #define TRUNCATED "\n(truncated)\n" char *GetVdatLoadKernelDebug(char *dest, int size, - const VbSharedDataHeader *sh) + const VbSharedDataHeader *sh) { int used = 0; int first_call_tracked = 0; @@ -566,7 +566,7 @@ int VbGetSystemPropertyInt(const char *name) if (!VbGetSystemPropertyString("hwid", hwid, sizeof(hwid))) { char fwtype_buf[VB_MAX_STRING_PROPERTY]; const char *fwtype = VbGetSystemPropertyString( - "mainfw_type", fwtype_buf, sizeof(fwtype_buf)); + "mainfw_type", fwtype_buf, sizeof(fwtype_buf)); if (fwtype && !strcasecmp(fwtype, "nonchrome")) { value = 1; } @@ -579,7 +579,7 @@ int VbGetSystemPropertyInt(const char *name) } const char *VbGetSystemPropertyString(const char *name, char *dest, - size_t size) + size_t size) { /* Check architecture-dependent properties first */ if (VbGetArchPropertyString(name, dest, size)) @@ -676,8 +676,8 @@ int VbSetSystemPropertyInt(const char *name, int value) return -1; kern_nv &= ~KERN_NV_FWUPDATE_TRIES_MASK; kern_nv |= (value & KERN_NV_FWUPDATE_TRIES_MASK); - return vb2_set_nv_storage_with_backup(VB2_NV_KERNEL_FIELD, - kern_nv); + return vb2_set_nv_storage_with_backup( + VB2_NV_KERNEL_FIELD, kern_nv); } else if (!strcasecmp(name,"block_devmode")) { int kern_nv = vb2_get_nv_storage(VB2_NV_KERNEL_FIELD); if (kern_nv == -1) @@ -685,8 +685,8 @@ int VbSetSystemPropertyInt(const char *name, int value) kern_nv &= ~KERN_NV_BLOCK_DEVMODE_FLAG; if (value) kern_nv |= KERN_NV_BLOCK_DEVMODE_FLAG; - return vb2_set_nv_storage_with_backup(VB2_NV_KERNEL_FIELD, - kern_nv); + return vb2_set_nv_storage_with_backup( + VB2_NV_KERNEL_FIELD, kern_nv); } else if (!strcasecmp(name,"tpm_attack")) { /* This value should only be read and cleared, but we allow * setting it to 1 for testing. */ @@ -697,35 +697,34 @@ int VbSetSystemPropertyInt(const char *name, int value) if (value) kern_nv |= KERN_NV_TPM_ATTACK_FLAG; return vb2_set_nv_storage_with_backup( - VB2_NV_KERNEL_FIELD, kern_nv); + VB2_NV_KERNEL_FIELD, kern_nv); } else if (!strcasecmp(name,"loc_idx")) { return vb2_set_nv_storage_with_backup( - VB2_NV_LOCALIZATION_INDEX, - value); + VB2_NV_LOCALIZATION_INDEX, value); } else if (!strcasecmp(name,"dev_boot_usb")) { return vb2_set_nv_storage_with_backup( - VB2_NV_DEV_BOOT_USB, value); + VB2_NV_DEV_BOOT_USB, value); } else if (!strcasecmp(name,"dev_boot_legacy")) { return vb2_set_nv_storage_with_backup( - VB2_NV_DEV_BOOT_LEGACY, value); + VB2_NV_DEV_BOOT_LEGACY, value); } else if (!strcasecmp(name,"dev_boot_signed_only")) { return vb2_set_nv_storage_with_backup( - VB2_NV_DEV_BOOT_SIGNED_ONLY, value); + VB2_NV_DEV_BOOT_SIGNED_ONLY, value); } else if (!strcasecmp(name,"dev_boot_fastboot_full_cap")) { return vb2_set_nv_storage_with_backup( - VB2_NV_DEV_BOOT_FASTBOOT_FULL_CAP, value); + VB2_NV_DEV_BOOT_FASTBOOT_FULL_CAP, value); } else if (!strcasecmp(name, "fastboot_unlock_in_fw")) { return vb2_set_nv_storage_with_backup( - VB2_NV_FASTBOOT_UNLOCK_IN_FW, value); + VB2_NV_FASTBOOT_UNLOCK_IN_FW, value); } else if (!strcasecmp(name, "dev_enable_udc")) { return vb2_set_nv_storage_with_backup( - VB2_NV_DEV_ENABLE_UDC, value); + VB2_NV_DEV_ENABLE_UDC, value); } else if (!strcasecmp(name, "boot_on_ac_detect")) { return vb2_set_nv_storage_with_backup( - VB2_NV_BOOT_ON_AC_DETECT, value); + VB2_NV_BOOT_ON_AC_DETECT, value); } else if (!strcasecmp(name, "try_ro_sync")) { return vb2_set_nv_storage_with_backup( - VB2_NV_TRY_RO_SYNC, value); + VB2_NV_TRY_RO_SYNC, value); } else if (!strcasecmp(name, "battery_cutoff_request")) { return vb2_set_nv_storage(VB2_NV_BATTERY_CUTOFF_REQUEST, value); } else if (!strcasecmp(name,"kernel_max_rollforward")) { @@ -763,7 +762,7 @@ int VbSetSystemPropertyString(const char* name, const char* value) for (i = 0; i < ARRAY_SIZE(default_boot); i++) { if (!strcasecmp(value, default_boot[i])) return vb2_set_nv_storage( - VB2_NV_DEV_DEFAULT_BOOT, i); + VB2_NV_DEV_DEFAULT_BOOT, i); } return -1; } diff --git a/host/lib/host_keyblock.c b/host/lib/host_keyblock.c index c315aad3..b8c9af3a 100644 --- a/host/lib/host_keyblock.c +++ b/host/lib/host_keyblock.c @@ -86,10 +86,10 @@ struct vb2_keyblock *vb2_create_keyblock( * the existing interface. */ struct vb2_keyblock *vb2_create_keyblock_external( const struct vb2_packed_key *data_key, - const char *signing_key_pem_file, - uint32_t algorithm, - uint32_t flags, - const char *external_signer) + const char *signing_key_pem_file, + uint32_t algorithm, + uint32_t flags, + const char *external_signer) { if (!signing_key_pem_file || !data_key || !external_signer) return NULL; diff --git a/host/lib/include/host_misc.h b/host/lib/include/host_misc.h index 1bcf6f06..63a38943 100644 --- a/host/lib/include/host_misc.h +++ b/host/lib/include/host_misc.h @@ -12,8 +12,8 @@ #include "vboot_struct.h" /* Copy up to dest_size-1 characters from src to dest, ensuring null - termination (which strncpy() doesn't do). Returns the destination - string. */ + * termination (which strncpy() doesn't do). Returns the destination + * string. */ char* StrCopy(char* dest, const char* src, int dest_size); /* Read data from [filename]. Store the size of returned data in [size]. diff --git a/host/lib/include/signature_digest.h b/host/lib/include/signature_digest.h index 936591a8..ac0cd11b 100644 --- a/host/lib/include/signature_digest.h +++ b/host/lib/include/signature_digest.h @@ -23,7 +23,7 @@ uint8_t* PrependDigestInfo(enum vb2_hash_algorithm hash_alg, uint8_t* digest); * pointer and must Free() it. */ uint8_t* SignatureDigest(const uint8_t* buf, uint64_t len, - unsigned int algorithm); + unsigned int algorithm); /* Calculates the signature on a buffer [buf] of length [len] using * the private RSA key file from [key_file] and signature algorithm @@ -32,5 +32,5 @@ uint8_t* SignatureDigest(const uint8_t* buf, uint64_t len, * Returns the signature. Caller owns the buffer and must Free() it. */ uint8_t* SignatureBuf(const uint8_t* buf, uint64_t len, const char* key_file, - unsigned int algorithm); + unsigned int algorithm); #endif /* VBOOT_REFERENCE_SIGNATURE_DIGEST_H_ */ diff --git a/host/lib/signature_digest.c b/host/lib/signature_digest.c index 7f309b18..a154ed4b 100644 --- a/host/lib/signature_digest.c +++ b/host/lib/signature_digest.c @@ -35,7 +35,7 @@ uint8_t* PrependDigestInfo(enum vb2_hash_algorithm hash_alg, uint8_t* digest) } uint8_t* SignatureDigest(const uint8_t* buf, uint64_t len, - unsigned int algorithm) + unsigned int algorithm) { uint8_t* info_digest = NULL; @@ -58,7 +58,7 @@ uint8_t* SignatureDigest(const uint8_t* buf, uint64_t len, } uint8_t* SignatureBuf(const uint8_t* buf, uint64_t len, const char* key_file, - unsigned int algorithm) + unsigned int algorithm) { const enum vb2_hash_algorithm hash_alg = vb2_crypto_to_hash(algorithm); FILE* key_fp = NULL; |