From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O7xeA-0000CR-9z for qemu-devel@nongnu.org; Fri, 30 Apr 2010 17:21:18 -0400 Received: from [140.186.70.92] (port=60951 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O7xe8-0000BB-T2 for qemu-devel@nongnu.org; Fri, 30 Apr 2010 17:21:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O7xe7-00070b-H8 for qemu-devel@nongnu.org; Fri, 30 Apr 2010 17:21:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19170) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O7xe7-00070J-9r for qemu-devel@nongnu.org; Fri, 30 Apr 2010 17:21:15 -0400 From: Alex Williamson Content-Type: text/plain; charset="UTF-8" Date: Fri, 30 Apr 2010 15:21:11 -0600 Message-ID: <1272662471.2822.9.camel@localhost> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] Fix boot once option List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: jan.kiszka@siemens.com The boot once options seems to have gotten broken since it originally went in. We need to wait until the second time restore_boot_devices() gets called before restoring the standard boot order and removing itself from the reset list. Signed-off-by: Alex Williamson -- diff --git a/vl.c b/vl.c index a485c58..2fabc7e 100644 --- a/vl.c +++ b/vl.c @@ -1193,6 +1193,13 @@ static void validate_bootdevices(char *devices) static void restore_boot_devices(void *opaque) { char *standard_boot_devices = opaque; + static int first = 1; + + /* Restore boot order and remove ourselves after the first boot */ + if (first) { + first = 0; + return; + } qemu_boot_set(standard_boot_devices);