cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
Blob Blame History Raw
From 2968c04bb24aaca2d9b8b46a5f67fe7ee3abe7fa Mon Sep 17 00:00:00 2001
From: "plai@redhat.com" <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 <ehabkost@redhat.com>
RH-Acked-by: Pankaj Gupta <pagupta@redhat.com>
RH-Acked-by: Stefano Garzarella <sgarzare@redhat.com>

From: Zhang Yi <yi.z.zhang@linux.intel.com>

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 <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>

(cherry picked from commit 87dc3ce60a8a16b47aeb6c5f4dbc14ee975563df)
Signed-off-by: Paul Lai <plai@redhat.com>

Resovled Conflicts:
	backends/hostmem-file.c

Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
---
 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