[20/29] discover/status: Add status messages for payload download results
diff mbox

Message ID 20161219041915.30497-21-sam@mendozajonas.com
State Accepted
Headers show

Commit Message

Samuel Mendoza-Jonas Dec. 19, 2016, 4:19 a.m. UTC
From: Jeremy Kerr <jk@ozlabs.org>

... using the URL which is now present in the load_result.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
---
 discover/boot.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

Patch
diff mbox

diff --git a/discover/boot.c b/discover/boot.c
index d259de8..82fba2f 100644
--- a/discover/boot.c
+++ b/discover/boot.c
@@ -309,12 +309,19 @@  static int check_load(struct boot_task *task, const char *name,
 {
 	if (!result)
 		return 0;
-	if (result->status != LOAD_ERROR)
+
+	if (result->status != LOAD_ERROR) {
+		update_status(task->status_fn, task->status_arg,
+				STATUS_ERROR,
+				_("Loaded %s from %s"), name,
+				pb_url_to_string(result->url));
 		return 0;
+	}
 
 	update_status(task->status_fn, task->status_arg,
 			STATUS_ERROR,
-			_("Couldn't load %s"), name);
+			_("Couldn't load %s from %s"), name,
+			pb_url_to_string(result->url));
 	return -1;
 }