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

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

 



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.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux