On Wed, Dec 19, 2012 at 08:38:13AM +0100, Gerd Hoffmann wrote: > On 12/19/12 08:24, Amos Kong wrote: > > Current seabios will try to boot from selected devices first, > > if they are all failed, seabios will also try to boot from > > un-selected devices. > > > > For example: > > @ qemu-kvm -boot order=n,menu=on ... > > > > Guest will boot from network first, if it's failed, guest will try to > > boot from other un-selected devices (floppy, cdrom, disk) one by one. > > > > Sometimes, user don't want to boot from some devices. This patch changes > > seabios to boot only from selected devices. > > I think (i.e. I didn't test) the patch breaks booting if the user didn't > explicitly specify a boot device.
Hi Gerd, | #define DEFAULT_PRIO 9999 If we don't select some devices, their priority will always be 9999 | static int DefaultFloppyPrio = 101; | static int DefaultCDPrio = 102; | static int DefaultHDPrio = 103; | static int DefaultBEVPrio = 104; The priority of selected devices will be changed to above values first, the priority might be re-changed. However, we can judge if device is selected or not by checking if the priority is 9999. . Boot guest without qemu boot option, guest will try to boot from network/hd/floppy/cdrom. . If seabios ignores the order parameter of qemu, guest will also try to boot from network/hd/floppy/cdrom. -- Amos.