From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0rT8-0007WV-6l for qemu-devel@nongnu.org; Tue, 16 Dec 2014 07:43:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y0rT3-0003fF-5M for qemu-devel@nongnu.org; Tue, 16 Dec 2014 07:43:14 -0500 Received: from mail-la0-f45.google.com ([209.85.215.45]:34731) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0rT2-0003ex-VS for qemu-devel@nongnu.org; Tue, 16 Dec 2014 07:43:09 -0500 Received: by mail-la0-f45.google.com with SMTP id gq15so11215777lab.32 for ; Tue, 16 Dec 2014 04:43:08 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1418721773-29042-6-git-send-email-arei.gonglei@huawei.com> References: <1418721773-29042-1-git-send-email-arei.gonglei@huawei.com> <1418721773-29042-6-git-send-email-arei.gonglei@huawei.com> From: Peter Maydell Date: Tue, 16 Dec 2014 12:42:48 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PULL 5/5] bootdevice: add Error **errp argument for QEMUBootSetHandler List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Gonglei (Arei)" Cc: Blue Swirl , Alexander Graf , "qemu-ppc@nongnu.org" , QEMU Developers , "Michael S. Tsirkin" On 16 December 2014 at 09:22, wrote: > @@ -412,9 +411,7 @@ void pc_cmos_init(ram_addr_t ram_size, ram_addr_t above_4g_mem_size, > object_property_set_link(OBJECT(machine), OBJECT(s), > "rtc_state", &error_abort); > > - if (set_boot_dev(s, boot_device)) { > - exit(1); > - } > + set_boot_dev(s, boot_device, &error_abort); This turns a "print error message and exit" path into an abort(), which doesn't seem right (this can be triggered by bad user input arguments, yes?). error_abort should only be used in cases where you would assert() if there was an error (ie where it would be a QEMU bug if it happened). thanks -- PMM