summaryrefslogtreecommitdiffstats
path: root/scripts/kernel-install.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-10-31 17:19:12 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-11-05 08:38:05 +0100
commitc3a0d67f77eec29ad2a3eb24a328becfd693ab8f (patch)
treecda5835898929324fd6f0def3c93768f9f47310a /scripts/kernel-install.c
parent183e6d8b74878cce25f09364863866da91aec5d3 (diff)
downloadbarebox-c3a0d67f77eec29ad2a3eb24a328becfd693ab8f.tar.gz
barebox-c3a0d67f77eec29ad2a3eb24a328becfd693ab8f.tar.xz
kernel-install: Add missing error messages
In some cases kernel-install can fail without printing anything. Add error messages for these cases. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts/kernel-install.c')
-rw-r--r--scripts/kernel-install.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/kernel-install.c b/scripts/kernel-install.c
index 6086357a44..459b45d864 100644
--- a/scripts/kernel-install.c
+++ b/scripts/kernel-install.c
@@ -533,6 +533,7 @@ static char *mount_path(char *in_path, int *newmount)
*newmount = 1;
return out_path;
}
+ fprintf(stderr, "cannot mount %s\n", in_path);
return NULL;
case MOUNT_MOUNT:
out_path = mount_path_mount(in_path);
@@ -540,6 +541,7 @@ static char *mount_path(char *in_path, int *newmount)
*newmount = 1;
return out_path;
}
+ fprintf(stderr, "cannot mount %s\n", in_path);
return NULL;
}
@@ -789,12 +791,18 @@ static int do_add_kernel(void)
}
ret = make_directory(conf_dir);
- if (ret)
+ if (ret) {
+ fprintf(stderr, "failed to create directory %s: %s\n",
+ conf_dir, strerror(errno));
return ret;
+ }
ret = make_directory(host_images_dir);
- if (ret)
+ if (ret) {
+ fprintf(stderr, "failed to create directory %s: %s\n",
+ host_images_dir, strerror(errno));
return ret;
+ }
fd = open(conf_path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
if (fd < 0) {