X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=ui%2Fcommon%2Fps3.c;h=c62a10d20dffc4f5f8eee107ac42ffa04c549d0a;hp=cb1c8d1e3b9fadbb0027835d21ba0f34fca4d218;hb=293fca73b2fe077e7780c1a42216a3db41a6e737;hpb=aea1d55d7e09f4544f96ccc54196c674d52420e8 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; }