diff options
author | Zhang Yi <yi.z.zhang@linux.intel.com> | 2018-10-24 22:14:56 +0800 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2018-12-11 15:45:22 -0200 |
commit | 87dc3ce60a8a16b47aeb6c5f4dbc14ee975563df (patch) | |
tree | 3eb05875fc0aba7da98405cf6c7d9fd7fbb56f46 /backends | |
parent | 32a1a94dd324d33578dca1dc96d7896a0244d768 (diff) | |
download | qemu-87dc3ce60a8a16b47aeb6c5f4dbc14ee975563df.zip qemu-87dc3ce60a8a16b47aeb6c5f4dbc14ee975563df.tar.gz qemu-87dc3ce60a8a16b47aeb6c5f4dbc14ee975563df.tar.bz2 |
hostmem-file: remove object id from pmem error message
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>
Message-Id: <a6491f996827f4039c1a52198ed5dcc7727cb0f9.1540389255.git.yi.z.zhang@linux.intel.com>
[ehabkost: reword commit message]
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'backends')
-rw-r--r-- | backends/hostmem-file.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c index 6630021..78f058d 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; } |