diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2010-09-23 06:48:41 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-09-23 09:55:50 +0200 |
commit | 7bd7d59e60f3f23862ebc09c9f3527ee24b2960f (patch) | |
tree | 94149369e9097d9d8d32f8081a3fdf434d9f6f1a /include | |
parent | fa1b191b4de0b91094c99cde84960d6b275ac302 (diff) | |
download | barebox-7bd7d59e60f3f23862ebc09c9f3527ee24b2960f.tar.gz barebox-7bd7d59e60f3f23862ebc09c9f3527ee24b2960f.tar.xz |
image: factorise string helper
before we duplicate it between common/bootm.c and scripts/mkimage.c
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/image.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/image.h b/include/image.h index 13d0303160..e47ecfe632 100644 --- a/include/image.h +++ b/include/image.h @@ -187,6 +187,33 @@ struct image_handle { int flags; }; +#if defined(CONFIG_CMD_BOOTM_SHOW_TYPE) || !defined(__BAREBOX__) +const char *image_os(uint8_t os); +const char *image_arch(uint8_t arch); +const char *image_type(uint8_t type); +const char *image_compression(uint8_t comp); +#else +static inline const char *image_os(uint8_t os) +{ + return NULL; +} + +static inline const char *image_arch(uint8_t arch) +{ + return NULL; +} + +static inline const char *image_type(uint8_t type) +{ + return NULL; +} + +static inline const char *image_compression(uint8_t comp) +{ + return NULL; +} +#endif + /* commamds/bootm.c */ void print_image_hdr (image_header_t *hdr); |