rimage: show correct error on write failure.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This commit is contained in:
Liam Girdwood 2017-06-15 14:33:39 +01:00
parent 1b0a663b0d
commit 321aa0504d
1 changed files with 2 additions and 1 deletions

View File

@ -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 ;
}