[libvirt] [PATCH v2 2/4] iscsi: Add exit status checking for virISCSIGetSession
Peter Krempa
pkrempa at redhat.com
Wed May 18 11:48:42 UTC 2016
On Wed, May 18, 2016 at 07:15:54 -0400, John Ferlan wrote:
> On 05/18/2016 01:55 AM, Peter Krempa wrote:
[...]
> > "cannot find session iscsiadm session" followed by the message and/or
> > containing the code will be probably the best case here. The function
> > you are modifying is meant to find the session so any error is basically
> > that it couldn't find it. The message from iscsiadm then helps
> > debugging.
> >
>
> Fair enough... Primary thought was to be consistent with previous error,
> but generating/using a unique error is fine... So rather than the if
> then else based on exit status, how about:
>
> virReportError(VIR_ERR_INTERNAL_ERROR,
> _("cannot find iscsiadm session: %s"),
> NULLSTR(error));
That is reasonable. ACK to that including 1/4 if I didn't ACK it before.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160518/2e157b28/attachment-0001.sig>
More information about the libvir-list
mailing list