Skip to contentSkip to conversation

image: Use ENOENT instead of ENOMEDIUM for better compatibility

PATCH In review Simon Glass 5 participants 5 messages Jun 16, 2013 – Jun 17, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 image: Use ENOENT instead of ENOMEDIUM for better compatibility

This error may not be defined on some platforms such as MacOS so host compilation will fail. Use one of the more common errors instead.

---
 common/image-fit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/image-fit.c +1 -1
index 7bf82d3..f40f160 100644
@@ -1557,7 +1557,7 @@ int fit_image_load(bootm_headers_t *images, const char *prop_name, ulong addr,
 	if (fit_image_get_data(fit, noffset, &buf, &size)) {
 		printf("Could not find %s subimage data!\n", prop_name);
 		bootstage_error(bootstage_id + BOOTSTAGE_SUB_GET_DATA);
-		return -ENOMEDIUM;
+		return -ENOENT;
 	}
 	len = (ulong)size;
 
Signature · 1 line
1.8.3
#1 lore raw

Hello Simon,

Quoted 14 lines · Simon Glass

This error may not be defined on some platforms such as MacOS so host compilation will fail. Use one of the more common errors instead.

---
common/image-fit.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
common/image-fit.c +0 -0
index 7bf82d3..f40f160 100644

common/image-fit.c int fit_image_load(bootm_headers_t *images, const char *prop_name, ulong addr, · line 1563

Quoted 8 lines
common/image-fit.c +1 -1
@@ -1557,7 +1557,7 @@ int fit_image_load(bootm_headers_t *images, const char *prop_name, ulong addr,
  	if (fit_image_get_data(fit, noffset, &buf, &size)) {
  		printf("Could not find %s subimage data!\n", prop_name);
  		bootstage_error(bootstage_id + BOOTSTAGE_SUB_GET_DATA);
-		return -ENOMEDIUM;
+		return -ENOENT;
  	}
  	len = (ulong)size;
 

This fixes building for FreeBSD as well, thanks.

Regards,
Jeroen

#3 lore raw

PATCH 1/1 image: Use ENOENT instead of ENOMEDIUM for better compatibility

In reply to Simon Glass
Quoted 4 lines · Simon Glass

This error may not be defined on some platforms such as MacOS so host compilation will fail. Use one of the more common errors instead.

on MacOS X 10.8.3 with the following tools used for building U-Boot:

arm-none-eabi-gcc (GCC) 4.7.2
GNU ld (GNU Binutils) 2.23.1

#4 lore raw

PATCH 1/1 image: Use ENOENT instead of ENOMEDIUM for better compatibility

In reply to Simon Glass
Quoted 4 lines · Simon Glass

This error may not be defined on some platforms such as MacOS so host compilation will fail. Use one of the more common errors instead.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130617/f7c6d7ce/attachment.pgp>