const char *name;
const char *str;
- QemuOptDesc *desc;
+ const QemuOptDesc *desc;
union {
int boolean;
uint64_t uint;
int qemu_opt_set(QemuOpts *opts, const char *name, const char *value)
{
QemuOpt *opt;
- QemuOptDesc *desc = opts->list->desc;
+ const QemuOptDesc *desc = opts->list->desc;
int i;
for (i = 0; desc[i].name != NULL; i++) {
int qemu_opts_do_parse(QemuOpts *opts, const char *params, const char *firstname)
{
- char option[128], value[128];
+ char option[128], value[1024];
const char *p,*pe,*pc;
for (p = params; *p != '\0'; p++) {
QemuOpts *qemu_opts_parse(QemuOptsList *list, const char *params, const char *firstname)
{
- char value[128], *id = NULL;
+ char value[1024], *id = NULL;
const char *p;
QemuOpts *opts;
/* Validate parsed opts against descriptions where no
* descriptions were provided in the QemuOptsList.
*/
-int qemu_opts_validate(QemuOpts *opts, QemuOptDesc *desc)
+int qemu_opts_validate(QemuOpts *opts, const QemuOptDesc *desc)
{
QemuOpt *opt;
int rc = 0;
QTAILQ_FOREACH(opts, &list->head, next) {
- rc = func(opts, opaque);
+ rc |= func(opts, opaque);
if (abort_on_failure && rc != 0)
break;
}