@@ -3767,6 +3767,7 @@ static void usage(void)
static int parse_args(int argc, char **argv)
{
const char *r;
+ char *buf;
int optind;
const struct qemu_argument *arginfo;
@@ -3802,11 +3803,15 @@ static int parse_args(int argc, char **argv)
if (optind >= argc) {
usage();
}
+ buf = g_strdup_printf("%s=%s", arginfo->env, argv[optind]);
arginfo->handle_opt(argv[optind]);
optind++;
} else {
+ buf = g_strdup_printf("%s=", arginfo->env);
arginfo->handle_opt(NULL);
}
+ (void) envlist_setenv(envlist, buf);
+ g_free(buf);
break;
}
}