qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: qemu-devel@nongnu.org
Cc: armbru@redhat.com
Subject: [Qemu-devel] [PATCH 2/1] error: Copy location information in error_copy()
Date: Thu, 10 Sep 2015 10:34:50 -0600	[thread overview]
Message-ID: <1441902890-23064-1-git-send-email-eblake@redhat.com> (raw)
In-Reply-To: <1441901956-21991-1-git-send-email-eblake@redhat.com>

Commit 1e9b65bb forgot to propagate source information to copied
errors.

Signed-off-by: Eric Blake <eblake@redhat.com>
---

I noticed this while rebasing my patch (as in 'why did I not
get a merge conflict where I expected one?'); of course we
could apply this one first, but swapping the patch order implies
even more rebasing :)

 util/error.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/util/error.c b/util/error.c
index 9dd474f..b1eb8a2 100644
--- a/util/error.c
+++ b/util/error.c
@@ -174,6 +174,9 @@ Error *error_copy(const Error *err)
     err_new = g_malloc0(sizeof(*err));
     err_new->msg = g_strdup(err->msg);
     err_new->err_class = err->err_class;
+    err_new->src = err->src;
+    err_new->line = err->line;
+    err_new->func = err->func;
     if (err->hint) {
         err_new->hint = g_string_new(err->hint->str);
     }
-- 
2.4.3

  reply	other threads:[~2015-09-10 16:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-10 16:19 [Qemu-devel] [PATCH v4] hmp: Allow for error message hints on HMP Eric Blake
2015-09-10 16:34 ` Eric Blake [this message]
2015-09-10 18:06   ` [Qemu-devel] [PATCH 2/1] error: Copy location information in error_copy() Markus Armbruster
2015-09-10 18:05 ` [Qemu-devel] [PATCH v4] hmp: Allow for error message hints on HMP Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1441902890-23064-1-git-send-email-eblake@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).