From 2968c04bb24aaca2d9b8b46a5f67fe7ee3abe7fa Mon Sep 17 00:00:00 2001 From: "plai@redhat.com" Date: Thu, 11 Apr 2019 18:48:03 +0100 Subject: [PATCH 09/11] hostmem-file: remove object id from pmem error message RH-Author: plai@redhat.com Message-id: <1555008483-17720-1-git-send-email-plai@redhat.com> Patchwork-id: 85563 O-Subject: [RHEL8.1 qemu-kvm PATCH ] hostmem-file: remove object id from pmem error message Bugzilla: 1687596 RH-Acked-by: Eduardo Habkost RH-Acked-by: Pankaj Gupta RH-Acked-by: Stefano Garzarella From: Zhang Yi BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1687596 Brew: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=21121663 Branch: rhel-8.1.0 --- We will never get the canonical path from the object before object_property_add_child. Signed-off-by: Zhang Yi Message-Id: [ehabkost: reword commit message] Signed-off-by: Eduardo Habkost (cherry picked from commit 87dc3ce60a8a16b47aeb6c5f4dbc14ee975563df) Signed-off-by: Paul Lai Resovled Conflicts: backends/hostmem-file.c Signed-off-by: Danilo C. L. de Paula --- backends/hostmem-file.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c index 2476dcb..4b667b7 100644 --- a/backends/hostmem-file.c +++ b/backends/hostmem-file.c @@ -145,9 +145,8 @@ 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)) { - error_setg(errp, "cannot change property 'pmem' of %s '%s'", - object_get_typename(o), - object_get_canonical_path_component(o)); + error_setg(errp, "cannot change property 'pmem' of %s.", + object_get_typename(o)); return; } @@ -156,9 +155,8 @@ static void file_memory_backend_set_pmem(Object *o, bool value, Error **errp) Error *local_err = NULL; 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), - object_get_canonical_path_component(o)); + " of %s. We can't ensure data persistence.", + object_get_typename(o)); error_propagate(errp, local_err); return; } -- 1.8.3.1