diff mbox series

raw handler: add more details in case of error

Message ID 20200701094005.3881937-1-sbabic@denx.de
State Accepted
Headers show
Series raw handler: add more details in case of error | expand

Commit Message

Stefano Babic July 1, 2020, 9:40 a.m. UTC
Reports the error from OS to better investigate issues on filesystems.

Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 handlers/raw_handler.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/handlers/raw_handler.c b/handlers/raw_handler.c
index 21bc779..ab210c0 100644
--- a/handlers/raw_handler.c
+++ b/handlers/raw_handler.c
@@ -208,8 +208,8 @@  static int install_raw_file(struct img_type *img,
 	if (use_mount) {
 		ret = swupdate_mount(img->device, DATADST_DIR, img->filesystem);
 		if (ret) {
-			ERROR("Device %s with filesystem %s cannot be mounted",
-				img->device, img->filesystem);
+			ERROR("Device %s with filesystem %s cannot be mounted: %s",
+				img->device, img->filesystem, strerror(errno));
 			return -1;
 		}