Re: [PATCH 3/8] hyperv: break out common lookups into separate functions

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

 



On Friday, 2 October 2020 23:50:22 CEST Matt Coleman wrote:
> On Oct 2, 2020, at 2:25 AM, Pino Toscano <ptoscano@xxxxxxxxxx> wrote:
> > Note that now hypervGetVirtualSystemByID() issues VIR_ERR_INTERNAL_ERROR
> > in case &computerSystem / *computerSystemList is null, instead of
> > VIR_ERR_NO_DOMAIN. Shouldn't this still be able to explicitly report
> > when the requested domain does not exist?
> 
> I’ll split it up into two conditionals. Would you prefer to see the NULL 
> check that produces the VIR_ERR_NO_DOMAIN error in the new helper 
> function (hypervGetVirtualSystemByID) or its caller 
> (hypervDomainLookupByID)?

This depends on the callers: if the logic for checking whether a domain
is considered "not already existing" makes sense for all the callers of
hypervGetVirtualSystemByID, then I'd say to add it there.

-- 
Pino Toscano

Attachment: signature.asc
Description: This is a digitally signed message part.


[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