[libvirt] [PATCH 3/3] parallels: Set the first HDD from XML as bootable
Michal Privoznik
mprivozn at redhat.com
Thu Feb 19 15:45:31 UTC 2015
On 19.02.2015 16:40, Ján Tomko wrote:
> On Thu, Feb 19, 2015 at 04:35:45PM +0100, Michal Privoznik wrote:
>> On 17.02.2015 12:52, Mikhail Feoktistov wrote:
>>> 1. Delete all boot devices for VM instance
>>> 2. Find the first HDD from XML and set it as bootable
>>>
>>> Now we support only one boot device and it should be HDD
>>> ---
>>> src/parallels/parallels_sdk.c | 95 +++++++++++++++++++++++++++++++++++++++--
>>> 1 files changed, 91 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c
>>> index 8660259..15822ab 100644
>>> --- a/src/parallels/parallels_sdk.c
>>> +++ b/src/parallels/parallels_sdk.c
>>> @@ -1987,6 +1987,69 @@ static int prlsdkClearDevices(PRL_HANDLE sdkdom)
>>> return ret;
>>> }
>>>
>>> +int
>>
>> static int. This function is used only within the parallels_sdk.c file.
>>
>>> +prlsdkRemoveBootDevices(PRL_HANDLE sdkdom)
>>> +{
>>> + PRL_RESULT pret;
>>> + PRL_UINT32 devCount;
>>> + PRL_HANDLE dev = PRL_INVALID_HANDLE;
>>> + PRL_DEVICE_TYPE devType;
>>> +
>>> + pret = PrlVmCfg_GetBootDevCount(sdkdom, &devCount);
>>> + prlsdkCheckRetGoto(pret, error);
>>> +
>>> + for (int i = 0; i < devCount; i++) {
>>
>> We don't use c99 style of for loops. Moreover, i should be the same type
>> as devCount.
>>
>
> Actually, 'make syntax-check' enforces that i is only used for variables
> of size_t or ssize_t.
That just a defect of our syntax-check rule.
Michal
More information about the libvir-list
mailing list