render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
c401cc
From 3e428c0b2ad662263ed63ad19aea06af5b9183cf Mon Sep 17 00:00:00 2001
c401cc
Message-Id: <3e428c0b2ad662263ed63ad19aea06af5b9183cf@dist-git>
c401cc
From: Peter Krempa <pkrempa@redhat.com>
c401cc
Date: Wed, 26 Feb 2014 14:55:16 +0100
c401cc
Subject: [PATCH] storage: Improve error message when a storage backend is
c401cc
 missing
c401cc
c401cc
https://bugzilla.redhat.com/show_bug.cgi?id=1032370
c401cc
c401cc
Include the name of the storage backend in the error message instead of
c401cc
just the number.
c401cc
c401cc
(cherry picked from commit 558ffad55efda22856b65da8cd991cb315822bbf)
c401cc
c401cc
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c401cc
---
c401cc
 src/storage/storage_backend.c | 3 ++-
c401cc
 1 file changed, 2 insertions(+), 1 deletion(-)
c401cc
c401cc
diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
c401cc
index 982cf43..17168a7 100644
c401cc
--- a/src/storage/storage_backend.c
c401cc
+++ b/src/storage/storage_backend.c
c401cc
@@ -1117,7 +1117,8 @@ virStorageBackendForType(int type)
c401cc
             return backends[i];
c401cc
 
c401cc
     virReportError(VIR_ERR_INTERNAL_ERROR,
c401cc
-                   _("missing backend for pool type %d"), type);
c401cc
+                   _("missing backend for pool type %d (%s)"),
c401cc
+                   type, NULLSTR(virStoragePoolTypeToString(type)));
c401cc
     return NULL;
c401cc
 }
c401cc
 
c401cc
-- 
c401cc
1.9.0
c401cc