]> git.ozlabs.org Git - petitboot/blobdiff - test/parser/utils.c
discover: Add reference to url in load_url_result
[petitboot] / test / parser / utils.c
index 5cebc99062ad23a06d6217804cf57ae88a298f74..9d40d2b1e17bf123326e263c0307e60e92206fc6 100644 (file)
@@ -73,7 +73,7 @@ struct discover_device *test_create_device(struct parser_test *test,
 {
        struct discover_device *dev;
 
-       dev = discover_device_create(test->handler, name);
+       dev = discover_device_create(test->handler, NULL, name);
 
        dev->device->id = talloc_strdup(dev, name);
        dev->device_path = talloc_asprintf(dev, "/dev/%s", name);
@@ -93,6 +93,7 @@ static struct discover_context *test_create_context(struct parser_test *test)
        list_init(&ctx->boot_options);
        ctx->device = test_create_device_simple(test);
        ctx->test_data = test;
+       ctx->handler = test->handler;
        device_handler_add_device(test->handler, ctx->device);
 
        return ctx;
@@ -352,6 +353,7 @@ struct load_url_result *load_url_async(void *ctx, struct pb_url *url,
                return NULL;
 
        result->local = talloc_strdup(result, tmp);
+       result->url = url;
        if (rc < 0)
                result->status = LOAD_ERROR;
        else