[libvirt] [PATCH v2] Fix error reporting when fetching SCSI/LVM keys

Eric Blake eblake at redhat.com
Thu Dec 13 22:16:00 UTC 2012


On 12/13/2012 03:37 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
> 
> The current  virStorageFileGet{LVM,SCSI}Key methods return
> the key as the return value. Unfortunately it is desirable
> for "NULL" to be a valid return value, as well as an error
> indicator. Thus the returned key must instead be provided
> as an out-parameter.
> 
> When we invoke lvs or scsi_id to extract ID for block devices,
> we don't want virCommandWait logging errors messages. Thus we
> must explicitly check 'status != 0', rather than letting
> virCommandWait do it.
> 
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
>  src/util/storage_file.c | 74 ++++++++++++++++++++++++++++++++-----------------
>  src/util/storage_file.h |  6 ++--
>  2 files changed, 53 insertions(+), 27 deletions(-)
> 

ACK.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121213/a6493cf4/attachment-0001.sig>


More information about the libvir-list mailing list