From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O8zFA-000136-W0 for qemu-devel@nongnu.org; Mon, 03 May 2010 13:15:45 -0400 Received: from [140.186.70.92] (port=52493 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O8zF6-0000zn-GE for qemu-devel@nongnu.org; Mon, 03 May 2010 13:15:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O8zEh-0001PV-IC for qemu-devel@nongnu.org; Mon, 03 May 2010 13:15:16 -0400 Received: from mail-iw0-f184.google.com ([209.85.223.184]:44692) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O8zEh-0001PQ-FC for qemu-devel@nongnu.org; Mon, 03 May 2010 13:15:15 -0400 Received: by iwn14 with SMTP id 14so3517594iwn.22 for ; Mon, 03 May 2010 10:15:14 -0700 (PDT) Message-ID: <4BDF049A.3050503@codemonkey.ws> Date: Mon, 03 May 2010 12:15:06 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Fix boot once option References: <1272662471.2822.9.camel@localhost> In-Reply-To: <1272662471.2822.9.camel@localhost> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Williamson Cc: jan.kiszka@siemens.com, qemu-devel@nongnu.org On 04/30/2010 04:21 PM, Alex Williamson wrote: > 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 > Applied. Thanks. Regards, Anthony Liguori > -- > > 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); > > > > > > >