diff options
author | 2009-09-12 07:36:22 +0000 | |
---|---|---|
committer | 2009-09-12 07:36:22 +0000 | |
commit | 72cf2d4f0e181d0d3a3122e04129c58a95da713e (patch) | |
tree | 4d13c505a692104406090e94dd654fd1e98ec34e /qemu-char.c | |
parent | Try to fix BSD breakage by 806b60248218bd5f74a8b070f5a99a864e8e51c6 (diff) | |
download | qemu-kvm-72cf2d4f0e181d0d3a3122e04129c58a95da713e.tar.gz qemu-kvm-72cf2d4f0e181d0d3a3122e04129c58a95da713e.tar.bz2 qemu-kvm-72cf2d4f0e181d0d3a3122e04129c58a95da713e.zip |
Fix sys-queue.h conflict for good
Problem: Our file sys-queue.h is a copy of the BSD file, but there are
some additions and it's not entirely compatible. Because of that, there have
been conflicts with system headers on BSD systems. Some hacks have been
introduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,
f40d753718c72693c5f520f0d9899f6e50395e94,
96555a96d724016e13190b28cffa3bc929ac60dc and
3990d09adf4463eca200ad964cc55643c33feb50 but the fixes were fragile.
Solution: Avoid the conflict entirely by renaming the functions and the
file. Revert the previous hacks.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'qemu-char.c')
-rw-r--r-- | qemu-char.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/qemu-char.c b/qemu-char.c index 4f2961802..8084a6785 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -106,8 +106,8 @@ /***********************************************************/ /* character device */ -static TAILQ_HEAD(CharDriverStateHead, CharDriverState) chardevs = - TAILQ_HEAD_INITIALIZER(chardevs); +static QTAILQ_HEAD(CharDriverStateHead, CharDriverState) chardevs = + QTAILQ_HEAD_INITIALIZER(chardevs); static int initial_reset_issued; static void qemu_chr_event(CharDriverState *s, int event) @@ -139,7 +139,7 @@ void qemu_chr_initial_reset(void) initial_reset_issued = 1; - TAILQ_FOREACH(chr, &chardevs, next) { + QTAILQ_FOREACH(chr, &chardevs, next) { qemu_chr_reset(chr); } } @@ -352,7 +352,7 @@ static int mux_proc_byte(CharDriverState *chr, MuxDriver *d, int ch) case 's': { DriveInfo *dinfo; - TAILQ_FOREACH(dinfo, &drives, next) { + QTAILQ_FOREACH(dinfo, &drives, next) { bdrv_commit(dinfo->bdrv); } } @@ -2400,7 +2400,7 @@ CharDriverState *qemu_chr_open_opts(QemuOpts *opts, if (!chr->filename) chr->filename = qemu_strdup(qemu_opt_get(opts, "backend")); chr->init = init; - TAILQ_INSERT_TAIL(&chardevs, chr, next); + QTAILQ_INSERT_TAIL(&chardevs, chr, next); if (qemu_opt_get_bool(opts, "mux", 0)) { CharDriverState *base = chr; @@ -2409,7 +2409,7 @@ CharDriverState *qemu_chr_open_opts(QemuOpts *opts, snprintf(base->label, len, "%s-base", qemu_opts_id(opts)); chr = qemu_chr_open_mux(base); chr->filename = base->filename; - TAILQ_INSERT_TAIL(&chardevs, chr, next); + QTAILQ_INSERT_TAIL(&chardevs, chr, next); } chr->label = qemu_strdup(qemu_opts_id(opts)); return chr; @@ -2438,7 +2438,7 @@ CharDriverState *qemu_chr_open(const char *label, const char *filename, void (*i void qemu_chr_close(CharDriverState *chr) { - TAILQ_REMOVE(&chardevs, chr, next); + QTAILQ_REMOVE(&chardevs, chr, next); if (chr->chr_close) chr->chr_close(chr); qemu_free(chr->filename); @@ -2450,7 +2450,7 @@ void qemu_chr_info(Monitor *mon) { CharDriverState *chr; - TAILQ_FOREACH(chr, &chardevs, next) { + QTAILQ_FOREACH(chr, &chardevs, next) { monitor_printf(mon, "%s: filename=%s\n", chr->label, chr->filename); } } @@ -2459,7 +2459,7 @@ CharDriverState *qemu_chr_find(const char *name) { CharDriverState *chr; - TAILQ_FOREACH(chr, &chardevs, next) { + QTAILQ_FOREACH(chr, &chardevs, next) { if (strcmp(chr->label, name) != 0) continue; return chr; |