Re: [PATCH 3/3] parallels: Set the first HDD from XML as bootable

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

 



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.

Jan

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[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]