[PATCH 4/6] hyperv: implement domainGetMaxVcpus

Matt Coleman mcoleman at datto.com
Thu Nov 12 14:15:05 UTC 2020


> On Nov 12, 2020, at 8:46 AM, Michal Privoznik <mprivozn at redhat.com> wrote:
> 
> On 11/12/20 12:51 PM, Matt Coleman wrote:
>> Co-authored-by: Sri Ramanujam <sramanujam at datto.com>
>> Signed-off-by: Matt Coleman <matt at datto.com>
>> ---
>>  src/hyperv/hyperv_driver.c | 16 ++++++++++++++++
>>  1 file changed, 16 insertions(+)
>> diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c
>> index 3c436d9465..0e35f18430 100644
>> --- a/src/hyperv/hyperv_driver.c
>> +++ b/src/hyperv/hyperv_driver.c
>> @@ -42,6 +42,11 @@
>>    VIR_LOG_INIT("hyperv.hyperv_driver");
>>  +/*
>> + * Forward declarations
>> + */
>> +static int hypervDomainIsActive(virDomainPtr domain);
>> +
> 
> I'm not a big fan of these declarations, because changing one place requires changing the other. Although in this case it doesn't matter really, because this declaration won't change as it's derived from public API. Anyway, might be worth shifting things around ..

I've been trying to keep the API implementations in the same order that 
they appear in _virHypervisorDriver, except for flipping some adjacent 
dependencies. It's helped me keep track of what is implemented and what 
remains, but I can stop doing that if you'd prefer to not have the 
forward declarations.

-- 
Matt





More information about the libvir-list mailing list