[libvirt] [PATCH 2/2] Clarify error message

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

 



* If a user specified a number of devices not equal to one, the error message could be misleading.
---
 src/storage/storage_backend_fs.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c
index ca1f4cb..7a36c57 100644
--- a/src/storage/storage_backend_fs.c
+++ b/src/storage/storage_backend_fs.c
@@ -366,7 +366,10 @@ virStorageBackendFileSystemMount(virConnectPtr conn,
     } else {
         if (pool->def->source.ndevice != 1) {
             virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR,
-                                  "%s", _("missing source device"));
+                                  _("Exactly one source device "
+                                    "may be specified for pool type '%s'"),
+                                  virStoragePoolFormatFileSystemTypeToString(
+                                      pool->def->source.format));
             return -1;
         }
     }
@@ -518,9 +521,10 @@ virStorageBackendFileSystemBuild(virConnectPtr conn,

     if (pool->def->source.ndevice != 1) {
         virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR,
-                              "Exactly one source device "
-                              "may be specified for pool type '%s'",
-                              virStoragePoolFormatFileSystemTypeToString(pool->def->source.format));
+                              _("Exactly one source device "
+                                "may be specified for pool type '%s'"),
+                              virStoragePoolFormatFileSystemTypeToString(
+                                  pool->def->source.format));
         goto out;
     }

-- 
1.6.5.5

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