[libvirt] [PATCH 5/5] conf: report errors when parsing video accel

Ján Tomko jtomko at redhat.com
Wed Oct 23 10:28:50 UTC 2019


On Fri, Oct 18, 2019 at 04:40:23PM -0500, Jonathon Jongsma wrote:
>If any of the values are invalid, report an error and return NULL rather
>than returning a partially-specified accel object. Convert to g_autofree

This is marginally better, but the reported errors will only get logged,
not reported - since the parent function does not treat a NULL accel as
a failure.

To properly propagate the errors to the user, the function needs to
distinguish between failure and no accel specified.

(Same for virDomainVideoResolutionDefParseXML which I guess was modelled
after this one)

Jano

>as well to simplify logic and remove the goto.
>
>Signed-off-by: Jonathon Jongsma <jjongsma at redhat.com>
>---
> src/conf/domain_conf.c | 12 +++++-------
> 1 file changed, 5 insertions(+), 7 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20191023/09921b56/attachment-0001.sig>


More information about the libvir-list mailing list