X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=discover%2Fpaths.c;h=54b843e77ce3d8df07bdf2df906c6c1231f327bc;hp=dcd7b493e129ec134e284f38fdca275cf8768dca;hb=f583f0cf35fc227db5f73ecd04daf7702735b740;hpb=0dca9e11c5bacd76a12b2e52a263ca7bd94b9a00 diff --git a/discover/paths.c b/discover/paths.c index dcd7b49..54b843e 100644 --- a/discover/paths.c +++ b/discover/paths.c @@ -158,7 +158,7 @@ static int busybox_progress_cb(void *arg) p = procinfo_get_process(procinfo); handler = p->stdout_data; - rc = process_stdout_custom(procinfo, &line); + rc = process_process_stdout(procinfo, &line); if (rc) { /* Unregister ourselves from progress tracking */ @@ -186,8 +186,10 @@ static int busybox_progress_cb(void *arg) } } - if (rc != 3) + if (rc != 3) { percentage = size = 0; + suffix = ' '; + } device_handler_status_download(handler, procinfo, percentage, size, suffix); @@ -584,12 +586,14 @@ struct load_url_result *load_url_async(void *ctx, struct pb_url *url, /* If the url is remote but network is not yet available queue up this * load for later */ - if (url->scheme != pb_url_file && - getaddrinfo(url->host, NULL, NULL, &res) != 0) { - pb_log("load task for %s queued pending network\n", url->full); - pending_network_jobs_add(task, flags); - task->result->status = LOAD_ASYNC; - return task->result; + if (url->scheme != pb_url_file) { + if (getaddrinfo(url->host, NULL, NULL, &res) != 0) { + pb_log("load task for %s queued pending network\n", url->full); + pending_network_jobs_add(task, flags); + task->result->status = LOAD_ASYNC; + return task->result; + } + freeaddrinfo(res); } switch (url->scheme) {