aboutsummaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2015-10-22 08:24:36 +0800
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-10-23 14:32:08 +1100
commit292475cbc4e92f1651a751e6d2b178a37d56d073 (patch)
treedbd67962c184efd64949399077069ca596b17437 /external
parent22f0fc39a7f9ada9d0487848e4758c4fe45bafed (diff)
downloadskiboot-292475cbc4e92f1651a751e6d2b178a37d56d073.zip
skiboot-292475cbc4e92f1651a751e6d2b178a37d56d073.tar.gz
skiboot-292475cbc4e92f1651a751e6d2b178a37d56d073.tar.bz2
gard: print error message when we can't open a flash device
If I run gard on system flash as a non-root user, I get: $ ./external/gard/gard list $ echo $? 1 which isn't too helpful. This change adds a basic error message to the open() failure. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external')
-rw-r--r--external/gard/gard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/external/gard/gard.c b/external/gard/gard.c
index 01488e3..4e891f3 100644
--- a/external/gard/gard.c
+++ b/external/gard/gard.c
@@ -741,7 +741,7 @@ int main(int argc, char **argv)
rc = file_init_path(filename, NULL, &(ctx->bl));
if (rc)
- return EXIT_FAILURE;
+ err(EXIT_FAILURE, "Can't open %s", filename);
rc = blocklevel_get_info(ctx->bl, NULL, &(ctx->f_size), NULL);
if (rc)