Revision dfe795e7 qemu-config.c
b/qemu-config.c | ||
---|---|---|
340 | 340 |
}, |
341 | 341 |
}; |
342 | 342 |
|
343 |
static QemuOptsList *vm_config_groups[] = { |
|
343 |
static QemuOptsList *vm_config_groups[32] = {
|
|
344 | 344 |
&qemu_drive_opts, |
345 | 345 |
&qemu_chardev_opts, |
346 | 346 |
&qemu_device_opts, |
... | ... | |
372 | 372 |
return find_list(vm_config_groups, group); |
373 | 373 |
} |
374 | 374 |
|
375 |
void qemu_add_opts(QemuOptsList *list) |
|
376 |
{ |
|
377 |
int entries, i; |
|
378 |
|
|
379 |
entries = ARRAY_SIZE(vm_config_groups); |
|
380 |
entries--; /* keep list NULL terminated */ |
|
381 |
for (i = 0; i < entries; i++) { |
|
382 |
if (vm_config_groups[i] == NULL) { |
|
383 |
vm_config_groups[i] = list; |
|
384 |
return; |
|
385 |
} |
|
386 |
} |
|
387 |
fprintf(stderr, "ran out of space in vm_config_groups"); |
|
388 |
abort(); |
|
389 |
} |
|
390 |
|
|
375 | 391 |
int qemu_set_option(const char *str) |
376 | 392 |
{ |
377 | 393 |
char group[64], id[64], arg[64]; |
Also available in: Unified diff