[Top][All Lists]
[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.
- [Qemu-devel] Re: [PATCHv4 08/15] Add get_fw_dev_path callback for pci bus., (continued)
- [Qemu-devel] [PATCHv4 10/15] Add get_dev_path callback for usb bus., Gleb Natapov, 2010/11/14
- [Qemu-devel] [PATCHv4 01/15] Introduce fw_name field to DeviceInfo structure., Gleb Natapov, 2010/11/14
- [Qemu-devel] [PATCHv4 06/15] Add get_fw_dev_path callback to IDE bus., Gleb Natapov, 2010/11/14
- [Qemu-devel] [PATCHv4 14/15] Add notifier that will be called when machine is fully created., Gleb Natapov, 2010/11/14
- [Qemu-devel] [PATCHv4 15/15] Pass boot device list to firmware., Gleb Natapov, 2010/11/14
- [Qemu-devel] Re: [PATCHv4 15/15] Pass boot device list to firmware., Blue Swirl, 2010/11/14
[Qemu-devel] Re: [PATCHv4 15/15] Pass boot device list to firmware., Blue Swirl, 2010/11/14
- [Qemu-devel] Re: [PATCHv4 15/15] Pass boot device list to firmware., Gleb Natapov, 2010/11/15
- [Qemu-devel] Re: [PATCHv4 15/15] Pass boot device list to firmware., Blue Swirl, 2010/11/15
- [Qemu-devel] Re: [PATCHv4 15/15] Pass boot device list to firmware., Gleb Natapov, 2010/11/16
- [Qemu-devel] Re: [PATCHv4 15/15] Pass boot device list to firmware., Blue Swirl, 2010/11/16
- [Qemu-devel] Re: [PATCHv4 15/15] Pass boot device list to firmware., Gleb Natapov, 2010/11/16