util/cbfstool: Fix typos

Change-Id: I6967a106ce1286d633ddeeb041f582e65f9ea78c
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/28208
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
Elyes HAOUAS 2018-08-23 18:08:20 +02:00 committed by Martin Roth
parent 7bb53aa386
commit 3db0198358
10 changed files with 30 additions and 30 deletions

View File

@ -685,7 +685,7 @@ static int cbfs_add_entry_at(struct cbfs_image *image,
len = content_offset - addr - header_size; len = content_offset - addr - header_size;
memcpy(entry, header, header_size); memcpy(entry, header, header_size);
if (len != 0) { if (len != 0) {
/* the header moved backwards a bit to accomodate cbfs_file /* the header moved backwards a bit to accommodate cbfs_file
* alignment requirements, so patch up ->offset to still point * alignment requirements, so patch up ->offset to still point
* to file data. * to file data.
*/ */
@ -1867,9 +1867,9 @@ struct cbfs_file_attribute *cbfs_add_file_attr(struct cbfs_file *header,
* If NULL, we have to create the first one. */ * If NULL, we have to create the first one. */
if (attr == NULL) { if (attr == NULL) {
/* New attributes start where the header ends. /* New attributes start where the header ends.
* header->offset is later set to accomodate the * header->offset is later set to accommodate the
* additional structure. * additional structure.
* No endianess translation necessary here, because both * No endianness translation necessary here, because both
* fields are encoded the same way. */ * fields are encoded the same way. */
header->attributes_offset = header->offset; header->attributes_offset = header->offset;
attr = (struct cbfs_file_attribute *) attr = (struct cbfs_file_attribute *)

View File

@ -29,7 +29,7 @@
/* Utilities */ /* Utilities */
int verbose = 0; int verbose = 0;
/* Small, OS/libc independent runtime check for endianess */ /* Small, OS/libc independent runtime check for endianness */
int is_big_endian(void) int is_big_endian(void)
{ {
static const uint32_t inttest = 0x12345678; static const uint32_t inttest = 0x12345678;

View File

@ -25,7 +25,7 @@
#include <commonlib/helpers.h> #include <commonlib/helpers.h>
#include <console/console.h> #include <console/console.h>
/* Endianess */ /* Endianness */
#include "swab.h" #include "swab.h"
#define IS_TOP_ALIGNED_ADDRESS(x) ((uint32_t)(x) > 0x80000000) #define IS_TOP_ALIGNED_ADDRESS(x) ((uint32_t)(x) > 0x80000000)

View File

@ -100,7 +100,7 @@
* accurate but it is actually good enough in practice. It allows the * accurate but it is actually good enough in practice. It allows the
* header transformation code to ignore the possibility of underrun. * header transformation code to ignore the possibility of underrun.
* *
* We also must accomodate different ELF files, and hence formats, * We also must accommodate different ELF files, and hence formats,
* in the same cbfs invocation. We might load a 64-bit payload * in the same cbfs invocation. We might load a 64-bit payload
* on a 32-bit machine; we might even have a mixed armv7/armv8 * on a 32-bit machine; we might even have a mixed armv7/armv8
* SOC or even a system with an x86/ARM! * SOC or even a system with an x86/ARM!

View File

@ -84,7 +84,7 @@ struct elf_writer;
void elf_init_eheader(Elf64_Ehdr *ehdr, int machine, int nbits, int endian); void elf_init_eheader(Elf64_Ehdr *ehdr, int machine, int nbits, int endian);
/* /*
* Initialize a new ELF writer. Deafult machine type, endianness, etc is * Initialize a new ELF writer. Default machine type, endianness, etc is
* copied from the passed in Elf64_Ehdr. Returns NULL on failure, valid * copied from the passed in Elf64_Ehdr. Returns NULL on failure, valid
* pointer on success. * pointer on success.
*/ */

View File

@ -91,7 +91,7 @@ struct linux_header {
u32 init_size; /* 0x260 */ u32 init_size; /* 0x260 */
} __packed; } __packed;
/* Paramters passed to 32-bit part of Linux /* Parameters passed to 32-bit part of Linux
* This is another view of the structure above.. */ * This is another view of the structure above.. */
struct linux_params { struct linux_params {
u8 orig_x; /* 0x00 */ u8 orig_x; /* 0x00 */

View File

@ -184,7 +184,7 @@ static size_t LZ4F_getBlockSize(unsigned blockSizeID)
} }
/* unoptimized version; solves endianess & alignment issues */ /* unoptimized version; solves endianness & alignment issues */
static U32 LZ4F_readLE32 (const BYTE* srcPtr) static U32 LZ4F_readLE32 (const BYTE* srcPtr)
{ {
U32 value32 = srcPtr[0]; U32 value32 = srcPtr[0];

View File

@ -65,7 +65,7 @@ You can contact the author at :
/* #define XXH_ACCEPT_NULL_INPUT_POINTER 1 */ /* #define XXH_ACCEPT_NULL_INPUT_POINTER 1 */
/* XXH_FORCE_NATIVE_FORMAT : /* XXH_FORCE_NATIVE_FORMAT :
* By default, xxHash library provides endian-independant Hash values, based on little-endian convention. * By default, xxHash library provides endian-independent Hash values, based on little-endian convention.
* Results are therefore identical for little-endian and big-endian CPU. * Results are therefore identical for little-endian and big-endian CPU.
* This comes at a performance cost for big-endian CPU, since some swapping is required to emulate little-endian format. * This comes at a performance cost for big-endian CPU, since some swapping is required to emulate little-endian format.
* Should endian-independance be of no importance for your application, you may set the #define below to 1, * Should endian-independance be of no importance for your application, you may set the #define below to 1,
@ -219,7 +219,7 @@ static U64 XXH_swap64 (U64 x)
/*************************************** /***************************************
* Architecture Macros * Architecture Macros
***************************************/ ***************************************/
typedef enum { XXH_bigEndian=0, XXH_littleEndian=1 } XXH_endianess; typedef enum { XXH_bigEndian=0, XXH_littleEndian=1 } XXH_endianness;
/* XXH_CPU_LITTLE_ENDIAN can be defined externally, for example one the compiler command line */ /* XXH_CPU_LITTLE_ENDIAN can be defined externally, for example one the compiler command line */
#ifndef XXH_CPU_LITTLE_ENDIAN #ifndef XXH_CPU_LITTLE_ENDIAN
@ -233,7 +233,7 @@ typedef enum { XXH_bigEndian=0, XXH_littleEndian=1 } XXH_endianess;
*****************************/ *****************************/
typedef enum { XXH_aligned, XXH_unaligned } XXH_alignment; typedef enum { XXH_aligned, XXH_unaligned } XXH_alignment;
FORCE_INLINE U32 XXH_readLE32_align(const void* ptr, XXH_endianess endian, XXH_alignment align) FORCE_INLINE U32 XXH_readLE32_align(const void* ptr, XXH_endianness endian, XXH_alignment align)
{ {
if (align==XXH_unaligned) if (align==XXH_unaligned)
return endian==XXH_littleEndian ? XXH_read32(ptr) : XXH_swap32(XXH_read32(ptr)); return endian==XXH_littleEndian ? XXH_read32(ptr) : XXH_swap32(XXH_read32(ptr));
@ -241,12 +241,12 @@ FORCE_INLINE U32 XXH_readLE32_align(const void* ptr, XXH_endianess endian, XXH_a
return endian==XXH_littleEndian ? *(const U32*)ptr : XXH_swap32(*(const U32*)ptr); return endian==XXH_littleEndian ? *(const U32*)ptr : XXH_swap32(*(const U32*)ptr);
} }
FORCE_INLINE U32 XXH_readLE32(const void* ptr, XXH_endianess endian) FORCE_INLINE U32 XXH_readLE32(const void* ptr, XXH_endianness endian)
{ {
return XXH_readLE32_align(ptr, endian, XXH_unaligned); return XXH_readLE32_align(ptr, endian, XXH_unaligned);
} }
FORCE_INLINE U64 XXH_readLE64_align(const void* ptr, XXH_endianess endian, XXH_alignment align) FORCE_INLINE U64 XXH_readLE64_align(const void* ptr, XXH_endianness endian, XXH_alignment align)
{ {
if (align==XXH_unaligned) if (align==XXH_unaligned)
return endian==XXH_littleEndian ? XXH_read64(ptr) : XXH_swap64(XXH_read64(ptr)); return endian==XXH_littleEndian ? XXH_read64(ptr) : XXH_swap64(XXH_read64(ptr));
@ -254,7 +254,7 @@ FORCE_INLINE U64 XXH_readLE64_align(const void* ptr, XXH_endianess endian, XXH_a
return endian==XXH_littleEndian ? *(const U64*)ptr : XXH_swap64(*(const U64*)ptr); return endian==XXH_littleEndian ? *(const U64*)ptr : XXH_swap64(*(const U64*)ptr);
} }
FORCE_INLINE U64 XXH_readLE64(const void* ptr, XXH_endianess endian) FORCE_INLINE U64 XXH_readLE64(const void* ptr, XXH_endianness endian)
{ {
return XXH_readLE64_align(ptr, endian, XXH_unaligned); return XXH_readLE64_align(ptr, endian, XXH_unaligned);
} }
@ -285,7 +285,7 @@ FORCE_INLINE U64 XXH_readLE64(const void* ptr, XXH_endianess endian)
/***************************** /*****************************
* Simple Hash Functions * Simple Hash Functions
*****************************/ *****************************/
FORCE_INLINE U32 XXH32_endian_align(const void* input, size_t len, U32 seed, XXH_endianess endian, XXH_alignment align) FORCE_INLINE U32 XXH32_endian_align(const void* input, size_t len, U32 seed, XXH_endianness endian, XXH_alignment align)
{ {
const BYTE* p = (const BYTE*)input; const BYTE* p = (const BYTE*)input;
const BYTE* bEnd = p + len; const BYTE* bEnd = p + len;
@ -371,7 +371,7 @@ unsigned int XXH32 (const void* input, size_t len, unsigned int seed)
XXH32_update(&state, input, len); XXH32_update(&state, input, len);
return XXH32_digest(&state); return XXH32_digest(&state);
#else #else
XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; XXH_endianness endian_detected = (XXH_endianness)XXH_CPU_LITTLE_ENDIAN;
# if !defined(XXH_USELESS_ALIGN_BRANCH) # if !defined(XXH_USELESS_ALIGN_BRANCH)
if ((((size_t)input) & 3) == 0) /* Input is 4-bytes aligned, leverage the speed benefit */ if ((((size_t)input) & 3) == 0) /* Input is 4-bytes aligned, leverage the speed benefit */
@ -390,7 +390,7 @@ unsigned int XXH32 (const void* input, size_t len, unsigned int seed)
#endif #endif
} }
FORCE_INLINE U64 XXH64_endian_align(const void* input, size_t len, U64 seed, XXH_endianess endian, XXH_alignment align) FORCE_INLINE U64 XXH64_endian_align(const void* input, size_t len, U64 seed, XXH_endianness endian, XXH_alignment align)
{ {
const BYTE* p = (const BYTE*)input; const BYTE* p = (const BYTE*)input;
const BYTE* bEnd = p + len; const BYTE* bEnd = p + len;
@ -511,7 +511,7 @@ unsigned long long XXH64 (const void* input, size_t len, unsigned long long seed
XXH64_update(&state, input, len); XXH64_update(&state, input, len);
return XXH64_digest(&state); return XXH64_digest(&state);
#else #else
XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; XXH_endianness endian_detected = (XXH_endianness)XXH_CPU_LITTLE_ENDIAN;
# if !defined(XXH_USELESS_ALIGN_BRANCH) # if !defined(XXH_USELESS_ALIGN_BRANCH)
if ((((size_t)input) & 7)==0) /* Input is aligned, let's leverage the speed advantage */ if ((((size_t)input) & 7)==0) /* Input is aligned, let's leverage the speed advantage */
@ -612,7 +612,7 @@ XXH_errorcode XXH64_reset(XXH64_state_t* state_in, unsigned long long seed)
} }
FORCE_INLINE XXH_errorcode XXH32_update_endian (XXH32_state_t* state_in, const void* input, size_t len, XXH_endianess endian) FORCE_INLINE XXH_errorcode XXH32_update_endian (XXH32_state_t* state_in, const void* input, size_t len, XXH_endianness endian)
{ {
XXH_istate32_t* state = (XXH_istate32_t *) state_in; XXH_istate32_t* state = (XXH_istate32_t *) state_in;
const BYTE* p = (const BYTE*)input; const BYTE* p = (const BYTE*)input;
@ -703,7 +703,7 @@ FORCE_INLINE XXH_errorcode XXH32_update_endian (XXH32_state_t* state_in, const v
XXH_errorcode XXH32_update (XXH32_state_t* state_in, const void* input, size_t len) XXH_errorcode XXH32_update (XXH32_state_t* state_in, const void* input, size_t len)
{ {
XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; XXH_endianness endian_detected = (XXH_endianness)XXH_CPU_LITTLE_ENDIAN;
if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT)
return XXH32_update_endian(state_in, input, len, XXH_littleEndian); return XXH32_update_endian(state_in, input, len, XXH_littleEndian);
@ -713,7 +713,7 @@ XXH_errorcode XXH32_update (XXH32_state_t* state_in, const void* input, size_t l
FORCE_INLINE U32 XXH32_digest_endian (const XXH32_state_t* state_in, XXH_endianess endian) FORCE_INLINE U32 XXH32_digest_endian (const XXH32_state_t* state_in, XXH_endianness endian)
{ {
const XXH_istate32_t* state = (const XXH_istate32_t*) state_in; const XXH_istate32_t* state = (const XXH_istate32_t*) state_in;
const BYTE * p = (const BYTE*)state->mem32; const BYTE * p = (const BYTE*)state->mem32;
@ -757,7 +757,7 @@ FORCE_INLINE U32 XXH32_digest_endian (const XXH32_state_t* state_in, XXH_endiane
unsigned int XXH32_digest (const XXH32_state_t* state_in) unsigned int XXH32_digest (const XXH32_state_t* state_in)
{ {
XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; XXH_endianness endian_detected = (XXH_endianness)XXH_CPU_LITTLE_ENDIAN;
if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT)
return XXH32_digest_endian(state_in, XXH_littleEndian); return XXH32_digest_endian(state_in, XXH_littleEndian);
@ -766,7 +766,7 @@ unsigned int XXH32_digest (const XXH32_state_t* state_in)
} }
FORCE_INLINE XXH_errorcode XXH64_update_endian (XXH64_state_t* state_in, const void* input, size_t len, XXH_endianess endian) FORCE_INLINE XXH_errorcode XXH64_update_endian (XXH64_state_t* state_in, const void* input, size_t len, XXH_endianness endian)
{ {
XXH_istate64_t * state = (XXH_istate64_t *) state_in; XXH_istate64_t * state = (XXH_istate64_t *) state_in;
const BYTE* p = (const BYTE*)input; const BYTE* p = (const BYTE*)input;
@ -857,7 +857,7 @@ FORCE_INLINE XXH_errorcode XXH64_update_endian (XXH64_state_t* state_in, const v
XXH_errorcode XXH64_update (XXH64_state_t* state_in, const void* input, size_t len) XXH_errorcode XXH64_update (XXH64_state_t* state_in, const void* input, size_t len)
{ {
XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; XXH_endianness endian_detected = (XXH_endianness)XXH_CPU_LITTLE_ENDIAN;
if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT)
return XXH64_update_endian(state_in, input, len, XXH_littleEndian); return XXH64_update_endian(state_in, input, len, XXH_littleEndian);
@ -867,7 +867,7 @@ XXH_errorcode XXH64_update (XXH64_state_t* state_in, const void* input, size_t l
FORCE_INLINE U64 XXH64_digest_endian (const XXH64_state_t* state_in, XXH_endianess endian) FORCE_INLINE U64 XXH64_digest_endian (const XXH64_state_t* state_in, XXH_endianness endian)
{ {
const XXH_istate64_t * state = (const XXH_istate64_t *) state_in; const XXH_istate64_t * state = (const XXH_istate64_t *) state_in;
const BYTE * p = (const BYTE*)state->mem64; const BYTE * p = (const BYTE*)state->mem64;
@ -951,7 +951,7 @@ FORCE_INLINE U64 XXH64_digest_endian (const XXH64_state_t* state_in, XXH_endiane
unsigned long long XXH64_digest (const XXH64_state_t* state_in) unsigned long long XXH64_digest (const XXH64_state_t* state_in)
{ {
XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; XXH_endianness endian_detected = (XXH_endianness)XXH_CPU_LITTLE_ENDIAN;
if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT)
return XXH64_digest_endian(state_in, XXH_littleEndian); return XXH64_digest_endian(state_in, XXH_littleEndian);

View File

@ -37,7 +37,7 @@ uint32_t LzmaEncProps_GetDictSize(const struct CLzmaEncProps *props2);
Returns: Returns:
SZ_OK - OK SZ_OK - OK
SZ_ERROR_MEM - Memory allocation error SZ_ERROR_MEM - Memory allocation error
SZ_ERROR_PARAM - Incorrect paramater in props SZ_ERROR_PARAM - Incorrect parameter in props
SZ_ERROR_WRITE - Write callback error. SZ_ERROR_WRITE - Write callback error.
SZ_ERROR_PROGRESS - some break from progress callback SZ_ERROR_PROGRESS - some break from progress callback
SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version)
@ -60,7 +60,7 @@ SRes LzmaEnc_MemEncode(CLzmaEncHandle p, uint8_t *dest, size_t *destLen, const u
Return code: Return code:
SZ_OK - OK SZ_OK - OK
SZ_ERROR_MEM - Memory allocation error SZ_ERROR_MEM - Memory allocation error
SZ_ERROR_PARAM - Incorrect paramater SZ_ERROR_PARAM - Incorrect parameter
SZ_ERROR_OUTPUT_EOF - output buffer overflow SZ_ERROR_OUTPUT_EOF - output buffer overflow
SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version)
*/ */

View File

@ -36,7 +36,7 @@ struct rmod_context {
/* endian conversion ops */ /* endian conversion ops */
struct xdr *xdr; struct xdr *xdr;
/* Parsed ELF sturcture. */ /* Parsed ELF structure. */
struct parsed_elf pelf; struct parsed_elf pelf;
/* Program segment. */ /* Program segment. */
Elf64_Phdr *phdr; Elf64_Phdr *phdr;