#include <image.h>
#endif /* !USE_HOSTCC*/
-static table_entry_t uimage_arch[] = {
+static const table_entry_t uimage_arch[] = {
{ IH_ARCH_INVALID, NULL, "Invalid ARCH", },
{ IH_ARCH_ALPHA, "alpha", "Alpha", },
{ IH_ARCH_ARM, "arm", "ARM", },
{ -1, "", "", },
};
-static table_entry_t uimage_os[] = {
+static const table_entry_t uimage_os[] = {
{ IH_OS_INVALID, NULL, "Invalid OS", },
{ IH_OS_LINUX, "linux", "Linux", },
#if defined(CONFIG_LYNXKDI) || defined(USE_HOSTCC)
{ -1, "", "", },
};
-static table_entry_t uimage_type[] = {
+static const table_entry_t uimage_type[] = {
{ IH_TYPE_INVALID, NULL, "Invalid Image", },
{ IH_TYPE_FILESYSTEM, "filesystem", "Filesystem Image", },
{ IH_TYPE_FIRMWARE, "firmware", "Firmware", },
{ -1, "", "", },
};
-static table_entry_t uimage_comp[] = {
+static const table_entry_t uimage_comp[] = {
{ IH_COMP_NONE, "none", "uncompressed", },
{ IH_COMP_BZIP2, "bzip2", "bzip2 compressed", },
{ IH_COMP_GZIP, "gzip", "gzip compressed", },
* long entry name if translation succeeds
* msg otherwise
*/
-char *get_table_entry_name (table_entry_t *table, char *msg, int id)
+char *get_table_entry_name(const table_entry_t *table, char *msg, int id)
{
for (; table->id >= 0; ++table) {
if (table->id == id)
* entry id if translation succeeds
* -1 otherwise
*/
-int get_table_entry_id (table_entry_t *table,
+int get_table_entry_id(const table_entry_t *table,
const char *table_name, const char *name)
{
- table_entry_t *t;
+ const table_entry_t *t;
#ifdef USE_HOSTCC
int first = 1;
* entry that matches the given short name. If a matching entry is
* found, it's id is returned to the caller.
*/
-int get_table_entry_id (table_entry_t *table,
+int get_table_entry_id(const table_entry_t *table,
const char *table_name, const char *name);
/*
* get_table_entry_name() scans the translation table trying to find
* an entry that matches the given id. If a matching entry is found,
* its long name is returned to the caller.
*/
-char *get_table_entry_name (table_entry_t *table, char *msg, int id);
+char *get_table_entry_name(const table_entry_t *table, char *msg, int id);
const char *genimg_get_os_name (uint8_t os);
const char *genimg_get_arch_name (uint8_t arch);