#include <string.h>
#include <url/url.h>
+#include <log/log.h>
#include <talloc/talloc.h>
#include "device-handler.h"
res->resolved = true;
}
-struct resource *create_devpath_resource(void *ctx,
+struct resource *create_devpath_resource(struct discover_boot_option *opt,
struct discover_device *orig_device,
const char *devpath)
{
struct resource *res;
struct pb_url *url;
- res = talloc(ctx, struct resource);
+ res = talloc(opt, struct resource);
pos = strchr(devpath, ':');
devstr = talloc_strndup(res, devpath, pos - devpath);
path = talloc_strdup(res, pos + 1);
+ pb_log("%s: resource depends on device %s\n", __func__, devstr);
+
/* defer resolution until we can find a suitable matching device */
info = talloc(res, struct devpath_resource_info);
info->dev = devstr;
return true;
}
-struct resource *create_url_resource(void *ctx, struct pb_url *url)
+struct resource *create_url_resource(struct discover_boot_option *opt,
+ struct pb_url *url)
{
struct resource *res;
- res = talloc(ctx, struct resource);
+ res = talloc(opt, struct resource);
res->url = url;
res->resolved = true;