diff options
Diffstat (limited to 'utility/include/dump_kernel_config.h')
-rw-r--r-- | utility/include/dump_kernel_config.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/utility/include/dump_kernel_config.h b/utility/include/dump_kernel_config.h index 2289da72..cacc5619 100644 --- a/utility/include/dump_kernel_config.h +++ b/utility/include/dump_kernel_config.h @@ -2,7 +2,7 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. * - * Exports the kernel commandline from a given partition/image. + * Exports the kernel commandline from a given partition/image file. */ #ifndef DUMP_KERNEL_CONFIG_UTILITY_H_ @@ -11,9 +11,14 @@ #include <inttypes.h> #include <stdlib.h> -uint8_t* FindKernelConfig(uint8_t* blob, uint64_t blob_size, - uint64_t kernel_body_load_address); +/* TODO(wfrichar): This needs a better location */ +#define MAX_KERNEL_CONFIG_SIZE 4096 -void* MMapFile(const char* filename, size_t *size); +/* Use this to obtain the body load address from the kernel preamble */ +#define USE_PREAMBLE_LOAD_ADDR (~0) + +/* Returns a new copy of the kernel cmdline. The caller must free it. */ +char *FindKernelConfig(const char *filename, + uint64_t kernel_body_load_address); #endif // DUMP_KERNEL_CONFIG_UTILITY_H_ |