X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=discover%2Fpaths.c;h=8d856192b15a1acb0635bcf1c5db792c8a275898;hb=1abc62990a5817de56a55470fb2c62e966134722;hp=1269dded35b73960c6b3d51c00efcd1b6e6aaafa;hpb=2c6137dffb1518f5102170cf0eda26c83a31bc63;p=petitboot diff --git a/discover/paths.c b/discover/paths.c index 1269dde..8d85619 100644 --- a/discover/paths.c +++ b/discover/paths.c @@ -47,6 +47,7 @@ char *join_paths(void *alloc_ctx, const char *a, const char *b) return full_path; } +#ifndef PETITBOOT_TEST static char *local_name(void *ctx) { @@ -382,6 +383,7 @@ struct load_url_result *load_url_async(void *ctx, struct pb_url *url, task->async = async_cb != NULL; task->result = talloc_zero(ctx, struct load_url_result); task->result->task = task; + task->result->url = url; task->process = process_create(task); if (task->async) { task->async_cb = async_cb; @@ -449,3 +451,33 @@ void load_url_async_cancel(struct load_url_result *res) res->status = LOAD_CANCELLED; process_stop_async(task->process); } + +#else + +static void __attribute__((unused)) load_local( + struct load_task *task __attribute__((unused))) +{ +} +static void __attribute__((unused)) load_wget( + struct load_task *task __attribute__((unused)), + int flags __attribute__((unused))) +{ +} +static void __attribute__((unused)) load_tftp( + struct load_task *task __attribute__((unused))) +{ +} +static void __attribute__((unused)) load_sftp( + struct load_task *task __attribute__((unused))) +{ +} +static void __attribute__((unused)) load_nfs( + struct load_task *task __attribute__((unused))) +{ +} +static void __attribute__((unused)) load_url_process_exit( + struct process *process __attribute__((unused))) +{ +} + +#endif