From 312fd5f29097890179793d8bbb59ab18afbe0ad4 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 8 Feb 2013 21:22:16 +0100 Subject: 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 Message-id: 1360354939-10994-4-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori --- hw/vhost_net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/vhost_net.c') diff --git a/hw/vhost_net.c b/hw/vhost_net.c index 8693ac27f6..d1df0e2447 100644 --- a/hw/vhost_net.c +++ b/hw/vhost_net.c @@ -214,7 +214,7 @@ int vhost_net_start(VirtIODevice *dev, NetClientState *ncs, int r, i = 0; if (!dev->binding->set_guest_notifiers) { - error_report("binding does not support guest notifiers\n"); + error_report("binding does not support guest notifiers"); r = -ENOSYS; goto err; } @@ -231,7 +231,7 @@ int vhost_net_start(VirtIODevice *dev, NetClientState *ncs, total_queues * 2, true); if (r < 0) { - error_report("Error binding guest notifier: %d\n", -r); + error_report("Error binding guest notifier: %d", -r); goto err; } -- cgit v1.2.3