[PATCHv2] conf: Reword error message to be more universal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The error message that warns user when a request to chagne/get
persistent configuration of a transient domain is requested suggests
that changes are being made. Reword it to be more universal and allow it
to be used for getter APIs too.

Before:
$ virsh vcpucount transient-domain --config
error: Requested operation is not valid: cannot change persistent config of a transient domain

After:
$ virsh vcpucount transient-domain --config
error: Requested operation is not valid: transient domains do not have any persistent config
---
 src/conf/domain_conf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 1643f30..758f416 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -2251,8 +2251,8 @@ virDomainLiveConfigHelperMethod(virCapsPtr caps,
     if (*flags & VIR_DOMAIN_AFFECT_CONFIG) {
         if (!dom->persistent) {
             virReportError(VIR_ERR_OPERATION_INVALID, "%s",
-                           _("cannot change persistent config of a "
-                             "transient domain"));
+                           _("transient domains do not have any "
+                             "persistent config"));
             goto cleanup;
         }
         if (!(*persistentDef = virDomainObjGetPersistentDef(caps, xmlopt, dom))) {
-- 
1.8.2.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]