- ctx->device_path = talloc_asprintf(ctx, "%s/%s", argv[1], argv[2]);
- ctx->device = talloc_zero(ctx, struct device);
- ctx->device->id = talloc_strdup(ctx->device, argv[2]);
+ ctx->device = talloc_zero(ctx, struct discover_device);
+ ctx->device->device = talloc_zero(ctx->device, struct device);
+ ctx->device->device_path = talloc_asprintf(ctx, "%s/%s",
+ argv[1], argv[2]);
+ ctx->device->device->id = talloc_strdup(ctx->device->device, argv[2]);