aboutsummaryrefslogtreecommitdiff
path: root/qemu-char.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2013-02-08 21:22:16 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2013-02-11 08:13:19 -0600
commit312fd5f29097890179793d8bbb59ab18afbe0ad4 (patch)
tree06b08cae96d4ce9d2c1e01fe1cef2a7f7ebc0b12 /qemu-char.c
parent1a9522cc6ea04968e1169f0195952d0029d5dbb9 (diff)
downloadqemu-312fd5f29097890179793d8bbb59ab18afbe0ad4.zip
qemu-312fd5f29097890179793d8bbb59ab18afbe0ad4.tar.gz
qemu-312fd5f29097890179793d8bbb59ab18afbe0ad4.tar.bz2
error: Strip trailing '\n' from error string arguments (again)
Commit 6daf194d and be62a2eb got rid of a bunch, but they keep coming back. Tracked down with this Coccinelle semantic patch: @r@ expression err, eno, cls, fmt; position p; @@ ( error_report(fmt, ...)@p | error_set(err, cls, fmt, ...)@p | error_set_errno(err, eno, cls, fmt, ...)@p | error_setg(err, fmt, ...)@p | error_setg_errno(err, eno, fmt, ...)@p ) @script:python@ fmt << r.fmt; p << r.p; @@ if "\\n" in str(fmt): print "%s:%s:%s:%s" % (p[0].file, p[0].line, p[0].column, fmt) Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-id: 1360354939-10994-4-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qemu-char.c')
-rw-r--r--qemu-char.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/qemu-char.c b/qemu-char.c
index a3ba021..574d3d2 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -3021,12 +3021,12 @@ CharDriverState *qemu_chr_new_from_opts(QemuOpts *opts,
int i;
if (qemu_opts_id(opts) == NULL) {
- error_setg(errp, "chardev: no id specified\n");
+ error_setg(errp, "chardev: no id specified");
goto err;
}
if (qemu_opt_get(opts, "backend") == NULL) {
- error_setg(errp, "chardev: \"%s\" missing backend\n",
+ error_setg(errp, "chardev: \"%s\" missing backend",
qemu_opts_id(opts));
goto err;
}
@@ -3035,14 +3035,14 @@ CharDriverState *qemu_chr_new_from_opts(QemuOpts *opts,
break;
}
if (i == ARRAY_SIZE(backend_table)) {
- error_setg(errp, "chardev: backend \"%s\" not found\n",
+ error_setg(errp, "chardev: backend \"%s\" not found",
qemu_opt_get(opts, "backend"));
goto err;
}
chr = backend_table[i].open(opts);
if (!chr) {
- error_setg(errp, "chardev: opening backend \"%s\" failed\n",
+ error_setg(errp, "chardev: opening backend \"%s\" failed",
qemu_opt_get(opts, "backend"));
goto err;
}