On Thu, Mar 30, 2017 at 02:03:45PM +0200, Peter Krempa wrote:
When registering a storage poll backend, the code would use
virStorageTypeToString instead of virStoragePoolTypeToString. The
following message would be logged:
virDriverLoadModuleFunc:71 : Lookup function 'virStorageBackendSCSIRegister'
virStorageBackendRegister:174 : Registering storage backend '(null)'
---
src/storage/storage_backend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
index ce278b99c..7f892df7e 100644
--- a/src/storage/storage_backend.c
+++ b/src/storage/storage_backend.c
@@ -171,7 +171,7 @@ int
virStorageBackendRegister(virStorageBackendPtr backend)
{
VIR_DEBUG("Registering storage backend '%s'",
- virStorageTypeToString(backend->type));
+ NULLSTR(virStoragePoolTypeToString(backend->type)));
The NULLSTR is unnecessary, since this is only being called from the backends
themselves and each backend sets the its type appropriately.
if (virStorageBackendsCount >= VIR_STORAGE_BACKENDS_MAX) {
virReportError(VIR_ERR_INTERNAL_ERROR,
^This virReportError also uses the incorrect stringifier and needs to be fixed.
ACK with adjustments.
Erik
--
2.12.1
--
libvir-list mailing list
libvir-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list