X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=discover%2Fpaths.c;h=c0e2b0638a2e59f8c1d84616620f0ae167741842;hb=8b9d8bf7c9837832347dd8018b9910cc7d2b4371;hp=24e978b4e2c1c4b5cfc6092f40adcb6b7cecc8e8;hpb=dc85de97c79c2172a87fc95cca16e6c6055dc1f4;p=petitboot diff --git a/discover/paths.c b/discover/paths.c index 24e978b..c0e2b06 100644 --- a/discover/paths.c +++ b/discover/paths.c @@ -41,15 +41,6 @@ struct load_task { void *async_data; }; -static inline bool have_busybox(void) -{ -#ifdef WITH_BUSYBOX - return true; -#else - return false; -#endif -} - const char *mount_base(void) { return DEVICE_MOUNT_BASE; @@ -71,6 +62,12 @@ char *join_paths(void *alloc_ctx, const char *a, const char *b) #ifndef PETITBOOT_TEST +#ifdef WITH_BUSYBOX +static inline bool have_busybox(void) { return true; } +#else +static inline bool have_busybox(void) { return false; } +#endif + static char *local_name(void *ctx) { char *ret, tmp[] = "/tmp/pb-XXXXXX"; @@ -119,6 +116,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) @@ -185,8 +184,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);