diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2010-10-13 13:11:09 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-10-13 17:39:49 +0200 |
commit | a64c756ad96e1ce08ff41b7ce305631bb09929c2 (patch) | |
tree | 77bad0bb56879c6ebc5335a3fc140f41acfb145e /include/image.h | |
parent | b531c53e74ed686947bd45eab22fb4d3b793a33b (diff) | |
download | barebox-a64c756ad96e1ce08ff41b7ce305631bb09929c2.tar.gz barebox-a64c756ad96e1ce08ff41b7ce305631bb09929c2.tar.xz |
image: remove confusing image_check_* functions
The function names do not make it clear what return value
is expected and do not save a single line of code. Put
the code inline and unbreak the wrong checks introduced
with a3c1e5d888d0ee317ffc7635694684bb71213c9c.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Eric BĂ©nard <eric@eukrea.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'include/image.h')
-rw-r--r-- | include/image.h | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/include/image.h b/include/image.h index 2c5956d600..a42d06bc31 100644 --- a/include/image.h +++ b/include/image.h @@ -320,61 +320,6 @@ static inline void image_set_name(image_header_t *hdr, const char *name) strncpy(image_get_name(hdr), name, IH_NMLEN); } -static inline int image_check_magic(const image_header_t *hdr) -{ - return (image_get_magic(hdr) == IH_MAGIC); -} -static inline int image_check_type(const image_header_t *hdr, uint8_t type) -{ - return (image_get_type(hdr) == type); -} -static inline int image_check_arch(const image_header_t *hdr, uint8_t arch) -{ - return (image_get_arch(hdr) == arch); -} -static inline int image_check_os(const image_header_t *hdr, uint8_t os) -{ - return (image_get_os(hdr) == os); -} - -#ifdef __BAREBOX__ -static inline int image_check_target_arch(const image_header_t *hdr) -{ -#if defined(__ARM__) - if (!image_check_arch(hdr, IH_ARCH_ARM)) -#elif defined(__avr32__) - if (!image_check_arch(hdr, IH_ARCH_AVR32)) -#elif defined(__bfin__) - if (!image_check_arch(hdr, IH_ARCH_BLACKFIN)) -#elif defined(__I386__) - if (!image_check_arch(hdr, IH_ARCH_I386)) -#elif defined(__m68k__) - if (!image_check_arch(hdr, IH_ARCH_M68K)) -#elif defined(__microblaze__) - if (!image_check_arch(hdr, IH_ARCH_MICROBLAZE)) -#elif defined(__mips__) - if (!image_check_arch(hdr, IH_ARCH_MIPS)) -#elif defined(__nios__) - if (!image_check_arch(hdr, IH_ARCH_NIOS)) -#elif defined(__nios2__) - if (!image_check_arch(hdr, IH_ARCH_NIOS2)) -#elif defined(__PPC__) - if (!image_check_arch(hdr, IH_ARCH_PPC)) -#elif defined(__sh__) - if (!image_check_arch(hdr, IH_ARCH_SH)) -#elif defined(__sparc__) - if (!image_check_arch(hdr, IH_ARCH_SPARC)) -#elif defined(CONFIG_LINUX) - if (!image_check_arch(hdr, IH_ARCH_LINUX)) -#else -# error Unknown CPU type -#endif - return 0; - - return 1; -} -#endif - ulong image_multi_count(const image_header_t *hdr); void image_multi_getimg(const image_header_t *hdr, ulong idx, ulong *data, ulong *len); |