summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'qemu-option.c')
-rw-r--r--qemu-option.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/qemu-option.c b/qemu-option.c
index 0c2101e3e..88298e4b5 100644
--- a/qemu-option.c
+++ b/qemu-option.c
@@ -477,21 +477,21 @@ struct QemuOpt {
} value;
QemuOpts *opts;
- TAILQ_ENTRY(QemuOpt) next;
+ QTAILQ_ENTRY(QemuOpt) next;
};
struct QemuOpts {
const char *id;
QemuOptsList *list;
- TAILQ_HEAD(, QemuOpt) head;
- TAILQ_ENTRY(QemuOpts) next;
+ QTAILQ_HEAD(, QemuOpt) head;
+ QTAILQ_ENTRY(QemuOpts) next;
};
static QemuOpt *qemu_opt_find(QemuOpts *opts, const char *name)
{
QemuOpt *opt;
- TAILQ_FOREACH(opt, &opts->head, next) {
+ QTAILQ_FOREACH(opt, &opts->head, next) {
if (strcmp(opt->name, name) != 0)
continue;
return opt;
@@ -556,7 +556,7 @@ static int qemu_opt_parse(QemuOpt *opt)
static void qemu_opt_del(QemuOpt *opt)
{
- TAILQ_REMOVE(&opt->opts->head, opt, next);
+ QTAILQ_REMOVE(&opt->opts->head, opt, next);
qemu_free((/* !const */ char*)opt->name);
qemu_free((/* !const */ char*)opt->str);
qemu_free(opt);
@@ -588,7 +588,7 @@ int qemu_opt_set(QemuOpts *opts, const char *name, const char *value)
opt = qemu_mallocz(sizeof(*opt));
opt->name = qemu_strdup(name);
opt->opts = opts;
- TAILQ_INSERT_TAIL(&opts->head, opt, next);
+ QTAILQ_INSERT_TAIL(&opts->head, opt, next);
if (desc[i].name != NULL) {
opt->desc = desc+i;
}
@@ -613,7 +613,7 @@ int qemu_opt_foreach(QemuOpts *opts, qemu_opt_loopfunc func, void *opaque,
QemuOpt *opt;
int rc = 0;
- TAILQ_FOREACH(opt, &opts->head, next) {
+ QTAILQ_FOREACH(opt, &opts->head, next) {
rc = func(opt->name, opt->str, opaque);
if (abort_on_failure && rc != 0)
break;
@@ -625,7 +625,7 @@ QemuOpts *qemu_opts_find(QemuOptsList *list, const char *id)
{
QemuOpts *opts;
- TAILQ_FOREACH(opts, &list->head, next) {
+ QTAILQ_FOREACH(opts, &list->head, next) {
if (!opts->id) {
continue;
}
@@ -658,8 +658,8 @@ QemuOpts *qemu_opts_create(QemuOptsList *list, const char *id, int fail_if_exist
opts->id = qemu_strdup(id);
}
opts->list = list;
- TAILQ_INIT(&opts->head);
- TAILQ_INSERT_TAIL(&list->head, opts, next);
+ QTAILQ_INIT(&opts->head);
+ QTAILQ_INSERT_TAIL(&list->head, opts, next);
return opts;
}
@@ -687,12 +687,12 @@ void qemu_opts_del(QemuOpts *opts)
QemuOpt *opt;
for (;;) {
- opt = TAILQ_FIRST(&opts->head);
+ opt = QTAILQ_FIRST(&opts->head);
if (opt == NULL)
break;
qemu_opt_del(opt);
}
- TAILQ_REMOVE(&opts->list->head, opts, next);
+ QTAILQ_REMOVE(&opts->list->head, opts, next);
qemu_free(opts);
}
@@ -702,7 +702,7 @@ int qemu_opts_print(QemuOpts *opts, void *dummy)
fprintf(stderr, "%s: %s:", opts->list->name,
opts->id ? opts->id : "<noid>");
- TAILQ_FOREACH(opt, &opts->head, next) {
+ QTAILQ_FOREACH(opt, &opts->head, next) {
fprintf(stderr, " %s=\"%s\"", opt->name, opt->str);
}
fprintf(stderr, "\n");
@@ -788,7 +788,7 @@ int qemu_opts_foreach(QemuOptsList *list, qemu_opts_loopfunc func, void *opaque,
QemuOpts *opts;
int rc = 0;
- TAILQ_FOREACH(opts, &list->head, next) {
+ QTAILQ_FOREACH(opts, &list->head, next) {
rc = func(opts, opaque);
if (abort_on_failure && rc != 0)
break;