From: Zhang Yi <yi.z.zhang@linux.intel.com>
To: mst@redhat.com, peter.maydell@linaro.org,
yu.c.zhang@linux.intel.com, ehabkost@redhat.com,
imammedo@redhat.com
Cc: qemu-devel@nongnu.org, pbonzini@redhat.com, stefanha@redhat.com,
crosthwaite.peter@gmail.com, richard.henderson@linaro.org,
xiaoguangrong.eric@gmail.com,
Zhang Yi <yi.z.zhang@linux.intel.com>
Subject: [Qemu-devel] [PATCH 1/1] hostmem-file: remove the invalid pmem object id.
Date: Wed, 24 Oct 2018 22:14:56 +0800 [thread overview]
Message-ID: <a6491f996827f4039c1a52198ed5dcc7727cb0f9.1540389255.git.yi.z.zhang@linux.intel.com> (raw)
In-Reply-To: <cover.1540389255.git.yi.z.zhang@linux.intel.com>
We will never get the canonical path from the object
before object_property_add_child.
Signed-off-by: Zhang Yi <yi.z.zhang@linux.intel.com>
---
backends/hostmem-file.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c
index 639c8d4..9691c48 100644
--- a/backends/hostmem-file.c
+++ b/backends/hostmem-file.c
@@ -145,26 +145,20 @@ static void file_memory_backend_set_pmem(Object *o, bool value, Error **errp)
HostMemoryBackendFile *fb = MEMORY_BACKEND_FILE(o);
if (host_memory_backend_mr_inited(backend)) {
- char *path = object_get_canonical_path_component(o);
- error_setg(errp, "cannot change property 'pmem' of %s '%s'",
- object_get_typename(o),
- path);
- g_free(path);
+ error_setg(errp, "cannot change property 'pmem' of %s.",
+ object_get_typename(o));
return;
}
#ifndef CONFIG_LIBPMEM
if (value) {
Error *local_err = NULL;
- char *path = object_get_canonical_path_component(o);
error_setg(&local_err,
"Lack of libpmem support while setting the 'pmem=on'"
- " of %s '%s'. We can't ensure data persistence.",
- object_get_typename(o),
- path);
- g_free(path);
+ " of %s. We can't ensure data persistence.",
+ object_get_typename(o));
error_propagate(errp, local_err);
return;
}
--
2.7.4
next parent reply other threads:[~2018-10-24 7:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1540389255.git.yi.z.zhang@linux.intel.com>
2018-10-24 14:14 ` Zhang Yi [this message]
2018-10-26 15:40 ` [Qemu-devel] [PATCH 1/1] hostmem-file: remove the invalid pmem object id Eduardo Habkost
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=a6491f996827f4039c1a52198ed5dcc7727cb0f9.1540389255.git.yi.z.zhang@linux.intel.com \
--to=yi.z.zhang@linux.intel.com \
--cc=crosthwaite.peter@gmail.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=stefanha@redhat.com \
--cc=xiaoguangrong.eric@gmail.com \
--cc=yu.c.zhang@linux.intel.com \
/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).