discover: Be more verbose about boot failures
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>
Mon, 30 Jul 2018 01:48:25 +0000 (11:48 +1000)
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>
Mon, 30 Jul 2018 04:17:05 +0000 (14:17 +1000)
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
discover/boot.c
discover/paths.c

index 2a0d333a4ea7bad7c9249764f119767c2228a0ba..04c32a188414e4f59f14285d72f87f32f35b2798 100644 (file)
@@ -341,6 +341,8 @@ static int check_load(struct boot_task *task, const char *name,
                return 0;
        }
 
+       pb_log("Failed to load %s from %s\n", name,
+                       pb_url_to_string(result->url));
        update_status(task->status_fn, task->status_arg,
                        STATUS_ERROR,
                        _("Couldn't load %s from %s"), name,
@@ -451,6 +453,8 @@ no_load:
                                        STATUS_ERROR,
                                        _("kexec reboot failed"));
                }
+       } else {
+               pb_log("Failed to load all boot resources\n");
        }
 }
 
@@ -462,6 +466,8 @@ static int start_url_load(struct boot_task *task, struct boot_resource *res)
        res->result = load_url_async(task, res->url, boot_process,
                                 task, NULL, task->status_arg);
        if (!res->result) {
+               pb_log("Error starting load for %s at %s\n",
+                               res->name, pb_url_to_string(res->url));
                update_status(task->status_fn, task->status_arg,
                                STATUS_ERROR, _("Error loading %s"),
                                res->name);
index dd54ba2bc178289e6ba240c04e24af485ee8c1cf..dcd7b493e129ec134e284f38fdca275cf8768dca 100644 (file)
@@ -118,6 +118,8 @@ static void load_url_process_exit(struct process *process)
        } else {
                result->status = LOAD_ERROR;
                load_url_result_cleanup_local(result);
+               pb_debug("Download client stdout buffer:\n%s\n",
+                               process->stdout_buf);
        }
 
        if (result->status == LOAD_OK && process->stdout_data)