Re: [PATCH 1/3] storage: backend: Use correct stringifier for pool type

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

 



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@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvir-list

--
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]
  Powered by Linux