+
+ opt = discover_boot_option_create(script->ctx, script->ctx->device);
+
+ /* XXX: --options=values need to be parsed properly; this is a simple
+ * implementation to get --id= working.
+ */
+ for (i = 1; i < st->argv->argc; ++i) {
+ if (strncmp("--id=", st->argv->argv[i], 5) == 0) {
+ id = st->argv->argv[i] + 5;
+ break;
+ }
+ }
+ if (st->argv->argc > 0)
+ opt->option->name = talloc_strdup(opt, st->argv->argv[0]);
+ else
+ opt->option->name = talloc_strdup(opt, "(unknown)");
+
+ opt->option->id = talloc_asprintf(opt->option, "%s#%s",
+ script->ctx->device->device->id,
+ id ? id : opt->option->name);
+
+ script->opt = opt;
+