Skip to contentSkip to conversation

sandbox: add_image: output errno string on mmap failure

PATCH Applied Robert Karszniewicz 2 participants 2 messages Oct 21, 2019 – Oct 23, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sandbox: add_image: output errno string on mmap failure

---
 arch/sandbox/os/common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sandbox/os/common.c +1 -1
index 86118822a..1b2daa396 100644
@@ -264,7 +264,7 @@ static int add_image(char *str, char *devname_template, int *devname_number)
 			PROT_READ | (readonly ? 0 : PROT_WRITE),
 			MAP_SHARED, fd, 0);
 	if ((void *)hf->base == MAP_FAILED)
-		printf("warning: mmapping %s failed\n", filename);
+		printf("warning: mmapping %s failed: %s\n", filename, strerror(errno));
 
 	ret = barebox_register_filedev(hf);
 	if (ret)
Signature · 7 lines
2.11.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 4 lines · Robert Karszniewicz
---
 arch/sandbox/os/common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox