Revision dfe795e7

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];
b/qemu-config.h
16 16
extern QemuOptsList qemu_cpudef_opts;
17 17

  
18 18
QemuOptsList *qemu_find_opts(const char *group);
19
void qemu_add_opts(QemuOptsList *list);
19 20
int qemu_set_option(const char *str);
20 21
int qemu_global_option(const char *str);
21 22
void qemu_add_globals(void);

Also available in: Unified diff