discover/status: Add status messages for payload download results
authorJeremy Kerr <jk@ozlabs.org>
Tue, 13 Dec 2016 04:00:08 +0000 (12:00 +0800)
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>
Tue, 20 Dec 2016 05:40:21 +0000 (16:40 +1100)
... 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

index d259de85964f09bc7786d84011be00520e9c0dab..82fba2f1da39279696a2564680904f780c6634e9 100644 (file)
@@ -309,12 +309,19 @@ static int check_load(struct boot_task *task, const char *name,
 {
        if (!result)
                return 0;
 {
        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;
                return 0;
+       }
 
        update_status(task->status_fn, task->status_arg,
                        STATUS_ERROR,
 
        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;
 }
 
        return -1;
 }