Revision 72cf2d4f qemu-option.c

b/qemu-option.c
477 477
    } value;
478 478

  
479 479
    QemuOpts     *opts;
480
    TAILQ_ENTRY(QemuOpt) next;
480
    QTAILQ_ENTRY(QemuOpt) next;
481 481
};
482 482

  
483 483
struct QemuOpts {
484 484
    const char *id;
485 485
    QemuOptsList *list;
486
    TAILQ_HEAD(, QemuOpt) head;
487
    TAILQ_ENTRY(QemuOpts) next;
486
    QTAILQ_HEAD(, QemuOpt) head;
487
    QTAILQ_ENTRY(QemuOpts) next;
488 488
};
489 489

  
490 490
static QemuOpt *qemu_opt_find(QemuOpts *opts, const char *name)
491 491
{
492 492
    QemuOpt *opt;
493 493

  
494
    TAILQ_FOREACH(opt, &opts->head, next) {
494
    QTAILQ_FOREACH(opt, &opts->head, next) {
495 495
        if (strcmp(opt->name, name) != 0)
496 496
            continue;
497 497
        return opt;
......
556 556

  
557 557
static void qemu_opt_del(QemuOpt *opt)
558 558
{
559
    TAILQ_REMOVE(&opt->opts->head, opt, next);
559
    QTAILQ_REMOVE(&opt->opts->head, opt, next);
560 560
    qemu_free((/* !const */ char*)opt->name);
561 561
    qemu_free((/* !const */ char*)opt->str);
562 562
    qemu_free(opt);
......
588 588
        opt = qemu_mallocz(sizeof(*opt));
589 589
        opt->name = qemu_strdup(name);
590 590
        opt->opts = opts;
591
        TAILQ_INSERT_TAIL(&opts->head, opt, next);
591
        QTAILQ_INSERT_TAIL(&opts->head, opt, next);
592 592
        if (desc[i].name != NULL) {
593 593
            opt->desc = desc+i;
594 594
        }
......
613 613
    QemuOpt *opt;
614 614
    int rc = 0;
615 615

  
616
    TAILQ_FOREACH(opt, &opts->head, next) {
616
    QTAILQ_FOREACH(opt, &opts->head, next) {
617 617
        rc = func(opt->name, opt->str, opaque);
618 618
        if (abort_on_failure  &&  rc != 0)
619 619
            break;
......
625 625
{
626 626
    QemuOpts *opts;
627 627

  
628
    TAILQ_FOREACH(opts, &list->head, next) {
628
    QTAILQ_FOREACH(opts, &list->head, next) {
629 629
        if (!opts->id) {
630 630
            continue;
631 631
        }
......
658 658
        opts->id = qemu_strdup(id);
659 659
    }
660 660
    opts->list = list;
661
    TAILQ_INIT(&opts->head);
662
    TAILQ_INSERT_TAIL(&list->head, opts, next);
661
    QTAILQ_INIT(&opts->head);
662
    QTAILQ_INSERT_TAIL(&list->head, opts, next);
663 663
    return opts;
664 664
}
665 665

  
......
687 687
    QemuOpt *opt;
688 688

  
689 689
    for (;;) {
690
        opt = TAILQ_FIRST(&opts->head);
690
        opt = QTAILQ_FIRST(&opts->head);
691 691
        if (opt == NULL)
692 692
            break;
693 693
        qemu_opt_del(opt);
694 694
    }
695
    TAILQ_REMOVE(&opts->list->head, opts, next);
695
    QTAILQ_REMOVE(&opts->list->head, opts, next);
696 696
    qemu_free(opts);
697 697
}
698 698

  
......
702 702

  
703 703
    fprintf(stderr, "%s: %s:", opts->list->name,
704 704
            opts->id ? opts->id : "<noid>");
705
    TAILQ_FOREACH(opt, &opts->head, next) {
705
    QTAILQ_FOREACH(opt, &opts->head, next) {
706 706
        fprintf(stderr, " %s=\"%s\"", opt->name, opt->str);
707 707
    }
708 708
    fprintf(stderr, "\n");
......
788 788
    QemuOpts *opts;
789 789
    int rc = 0;
790 790

  
791
    TAILQ_FOREACH(opts, &list->head, next) {
791
    QTAILQ_FOREACH(opts, &list->head, next) {
792 792
        rc = func(opts, opaque);
793 793
        if (abort_on_failure  &&  rc != 0)
794 794
            break;

Also available in: Unified diff