summaryrefslogtreecommitdiffstats
path: root/ui/common
diff options
context:
space:
mode:
authorGeoff Levand <geoffrey.levand@am.sony.com>2009-08-25 17:25:12 -0700
committerGeoff Levand <geoffrey.levand@am.sony.com>2009-08-25 17:40:00 -0700
commitd29c9620cd853d9ead31075f237f53b9e6301a52 (patch)
tree5b02e75bc0e298c4d3656264f4b91e6da5e5e462 /ui/common
parent3367ca766bedda62e94a39e672e107aff6f3b144 (diff)
downloadpetitboot-d29c9620cd853d9ead31075f237f53b9e6301a52.zip
petitboot-d29c9620cd853d9ead31075f237f53b9e6301a52.tar.gz
Fix seg fault on ps3 flash error
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Diffstat (limited to 'ui/common')
-rw-r--r--ui/common/ps3.c9
-rw-r--r--ui/common/url.c2
2 files changed, 5 insertions, 6 deletions
diff --git a/ui/common/ps3.c b/ui/common/ps3.c
index cb1c8d1..c62a10d 100644
--- a/ui/common/ps3.c
+++ b/ui/common/ps3.c
@@ -87,7 +87,7 @@ static int ps3_flash_open(struct ps3_flash_ctx *fc, const char *mode)
result = os_area_fixed_read(&fc->header, &fc->params, fc->dev);
if (result) {
- pb_log("%s: os_area_fixed_read failed: %s\n", __func__);
+ pb_log("%s: os_area_fixed_read failed\n", __func__);
goto fail;
}
@@ -114,7 +114,7 @@ int ps3_flash_get_values(struct ps3_flash_values *values)
result = ps3_flash_open(&fc, "r");
if (result)
- goto done;
+ goto fail;
result = os_area_db_read(&fc.db, &fc.header, fc.dev);
@@ -123,7 +123,7 @@ int ps3_flash_get_values(struct ps3_flash_values *values)
if (result) {
pb_log("%s: os_area_db_read failed: %s\n", __func__,
strerror(errno));
- goto done;
+ goto fail;
}
sum = result = os_area_db_get(&fc.db, &id_default_item, &tmp);
@@ -141,14 +141,13 @@ int ps3_flash_get_values(struct ps3_flash_values *values)
if (!result)
values->video_mode = (uint16_t)tmp;
-done:
pb_log("%s: default_item: %x\n", __func__,
(unsigned int)values->default_item);
pb_log("%s: timeout: %u\n", __func__,
(unsigned int)values->timeout);
pb_log("%s: video_mode: %u\n", __func__,
(unsigned int)values->video_mode);
-
+fail:
return (result || sum) ? -1 : 0;
}
diff --git a/ui/common/url.c b/ui/common/url.c
index 0de0f58..544eee2 100644
--- a/ui/common/url.c
+++ b/ui/common/url.c
@@ -140,7 +140,7 @@ struct pb_url *pb_url_parse(void *ctx, const char *url_str)
path = strchr(p, '/');
if (!path) {
- pb_log("%s: parse path failed '%s'\n", p);
+ pb_log("%s: parse path failed '%s'\n", __func__ , p);
goto fail;
}
OpenPOWER on IntegriCloud