qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCHv4 15/15] Pass boot device list to firmware.


From: Michael S. Tsirkin
Subject: [Qemu-devel] Re: [PATCHv4 15/15] Pass boot device list to firmware.
Date: Sun, 14 Nov 2010 22:57:50 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Sun, Nov 14, 2010 at 08:52:37PM +0200, Gleb Natapov wrote:
> > > +
> > > +        len = strlen(bootpath);
> > > +        list = qemu_realloc(list, total + len + 1);
> > > +        list[total++] = len;
> > > +        memcpy(&list[total], bootpath, len);
> > > +        total += len;
> > > +        c++;
> > > +        qemu_free(bootpath);
> > 
> > Man, is this tricky.
> > 
> Nah, not at all.

I think it will be easier if we don't try to do this in one pass.
1. pass: calculate total length and # of devices
2. allocate
2. pass fill in

> --
>                       Gleb.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]