Skip to content

Commit

Permalink
rename detectInputEndianess-function to isConsistentConfigArea to bet…
Browse files Browse the repository at this point in the history
…ter reflect its purpose
  • Loading branch information
er13 committed Mar 26, 2017
1 parent 89dee38 commit 2b549ad
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion avm_kernel_config/avm_kernel_config_helpers.c
Expand Up @@ -72,7 +72,7 @@ void closeMemoryMappedFile(struct memoryMappedFile *file)

}

bool detectInputEndianess(struct _avm_kernel_config * *configArea, size_t configSize, bool *swapNeeded)
bool isConsistentConfigArea(struct _avm_kernel_config * *configArea, size_t configSize, bool *swapNeeded)
{
uint32_t * arrayStart = NULL;
uint32_t * arrayEnd = NULL;
Expand Down
2 changes: 1 addition & 1 deletion avm_kernel_config/avm_kernel_config_helpers.h
Expand Up @@ -31,7 +31,7 @@ struct memoryMappedFile

bool openMemoryMappedFile(struct memoryMappedFile *file, const char *fileName, const char *fileDescription, int openFlags, int prot, int flags);
void closeMemoryMappedFile(struct memoryMappedFile *file);
bool detectInputEndianess(struct _avm_kernel_config * *configArea, size_t configSize, bool *swapNeeded);
bool isConsistentConfigArea(struct _avm_kernel_config * *configArea, size_t configSize, bool *swapNeeded);
void swapEndianess(bool needed, uint32_t *ptr);

#endif
2 changes: 1 addition & 1 deletion avm_kernel_config/extract_avm_kernel_config.c
Expand Up @@ -46,7 +46,7 @@ bool checkConfigArea(struct _avm_kernel_config ** configArea, size_t configSize)
{
bool swapNeeded = false;

if (!detectInputEndianess(configArea, configSize, &swapNeeded)) return false;
if (!isConsistentConfigArea(configArea, configSize, &swapNeeded)) return false;
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion avm_kernel_config/gen_avm_kernel_config.c
Expand Up @@ -50,7 +50,7 @@ bool relocateConfigArea(struct _avm_kernel_config * *configArea, size_t configSi
// - we take the first 32 bit value from the dump and align this pointer to 4K to get
// the start address of the area in the linked kernel

if (!detectInputEndianess(configArea, configSize, &swapNeeded)) return false;
if (!isConsistentConfigArea(configArea, configSize, &swapNeeded)) return false;

configBase = (uint32_t) configArea;
swapEndianess(swapNeeded, (uint32_t *) configArea);
Expand Down

0 comments on commit 2b549ad

Please sign in to comment.