[Sound-open-firmware] [PATCH 1/3] rimage: show correct error on write failure.

Liam Girdwood liam.r.girdwood at linux.intel.com
Thu Jun 15 15:36:38 CEST 2017


Signed-off-by: Liam Girdwood <liam.r.girdwood at linux.intel.com>
---
 rimage/baytrail.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/rimage/baytrail.c b/rimage/baytrail.c
index 12ccd23..ed1c840 100644
--- a/rimage/baytrail.c
+++ b/rimage/baytrail.c
@@ -159,7 +159,8 @@ int byt_write_modules(struct image *image)
 
 	count = fwrite(&hdr, sizeof(hdr), 1, image->out_fd);
 	if (count != 1) {
-		fprintf(stderr, "error: failed to write section header %d\n", i);
+		fprintf(stderr, "error: failed to write section header %d\n",
+			-errno);
 		return -errno ;
 	}
 
-- 
1.9.1



More information about the Sound-open-firmware mailing list