From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1aMh2I-00079I-Bl for mharc-grub-devel@gnu.org; Fri, 22 Jan 2016 14:06:18 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMh2G-00078i-5u for grub-devel@gnu.org; Fri, 22 Jan 2016 14:06:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMh2F-0003Xy-DK for grub-devel@gnu.org; Fri, 22 Jan 2016 14:06:16 -0500 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:38571) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMh2F-0003Xj-5Y for grub-devel@gnu.org; Fri, 22 Jan 2016 14:06:15 -0500 Received: by mail-wm0-x233.google.com with SMTP id b14so147053932wmb.1 for ; Fri, 22 Jan 2016 11:06:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type; bh=OHDHouiJ6yWHNUBg1sOOBT9tJnhKxlA6W4OZRyxF59E=; b=i2Zdj4TOabZ1PVVuKTo6pYBZ3b8u40BBnvkR3OKQWSOtlpF8tIYfhEz6x2pwWE2U9b Y6xuZLwlv5/+isSV/5lq6+Yrpr9c56d7Ygeh/elJ8bdfUcwXXIJe8SuO7GbvDSBwHTHS ER91Cny+OsJ80Lz6ZKMc9GOFqdjh/TwqWOlqv9xmHP7ETIJevq0wP4O1K/Wf5bBFRMNX f9+jZmbn/CajjeJvZeNdZU68Hf2ebK1Ry/T1AR38M5RxNuctKdN+aXUE/USzlVW4/Geh Y9rgLQgvQI4dGel3m+jLQ/uFN8+PebmhviGl4aDSzI7YBETgcc4xC3GENe45EYs/TxdY aTLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type; bh=OHDHouiJ6yWHNUBg1sOOBT9tJnhKxlA6W4OZRyxF59E=; b=B2Ab8UfyIUsUGiD1mbsGLaDX/lyfvj5WFaMqRARwerIzfeHybX5biJexcSHao+QV4t MS20WBVDRI6cKKeX+KFnjDmUJ8TKIr7UiAucvf8+buRdL/f9hoCsRc4l6W/ccwRWO/+l 3qME0yjxqayIJdBG14PI9GsKLD5COyz51DocXp+6DxWdAS8pmGxSzbt3UYxTTXMjuFEy ci3E506CWy/vodVM9kV4iQlrD7ho7UkRD6dY0tzhJch545gA8dvMNNBWeSb3BOymeDdg xv3afVpKGwfvS/Yk9nwNXMOy7BZmf7SHTBSpUioBp7FiU2tcc5DdqOSTtIad2+OHy2Vv HJsQ== X-Gm-Message-State: AG10YOQLAzb+t4q8+QUt3Bpcy9JP7MRaHbVJK7qZUPe7HJOrufs6OzMwnHLA1V8dkTs1aw== X-Received: by 10.194.216.100 with SMTP id op4mr4498111wjc.85.1453489574547; Fri, 22 Jan 2016 11:06:14 -0800 (PST) Received: from ?IPv6:2a02:120b:2c41:63f0:a2a8:cdff:fe64:b3b5? ([2a02:120b:2c41:63f0:a2a8:cdff:fe64:b3b5]) by smtp.gmail.com with ESMTPSA id g3sm7160575wjw.31.2016.01.22.11.06.12 for (version=TLSv1/SSLv3 cipher=OTHER); Fri, 22 Jan 2016 11:06:12 -0800 (PST) Subject: Re: [PATCH] [RFC] Add exitcode support To: The development of GNU GRUB References: <20150818173044.GA2020@fluid.dannf> From: =?UTF-8?Q?Vladimir_'=cf=86-coder/phcoder'_Serbinenko?= X-Enigmail-Draft-Status: N1110 Message-ID: <56A27D9F.7040403@gmail.com> Date: Fri, 22 Jan 2016 20:06:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="WtLsfkW6gRUJWmcm8qJvVGTj7lqtrbj51" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::233 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2016 19:06:17 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --WtLsfkW6gRUJWmcm8qJvVGTj7lqtrbj51 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 18.08.2015 21:17, Ben Hildred wrote: > Let's assume for a minute that I have compiled grub as a multiboot imag= e > and have called it from another bootloader, say iPXE.Now iPXE assumes > that any false return is an error. What happens when grub returns with > exit next, does iPXE get a true or false? What about exit fred where > fred is not defined by any platform? What if I do an exit config which > is only defined for coreboot? Neither multiboot nor coreboot have any return semantics. The situation with current platforms is as follows: No return/exit semantics at all or machine shutdown: i386_coreboot, i386_qemu, i386_multiboot, mips_qemu_mips, mips_loongson no-args exit: *-ieee1275, i386-pc, mips-arc Xen semantics (crash vs poweroff): *-xen EFI semantics: *-efi Unix-like semantics: arm-uboot, emu Emu is of no real interest and I have no idea what Uboot does with return code but I suppose nothing. This leaves us only with xen and EFI semantics. Xen is enough of outlier to handle it separately. So only EFI is remaining. On i386-pc the default behaviour of exit is to try next boot entry. EFI should probably do the same. What is the current behaviour of grub_exit and what is the value in returning EFI_SUCCESS ? Can we have returncode-aware command to be EFI-specific? --WtLsfkW6gRUJWmcm8qJvVGTj7lqtrbj51 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iF4EAREKAAYFAlaifZ8ACgkQmBXlbbo5nOuqLgD6AkC/y+NIte8BbdEC+aF6qk18 JRIuzbpLz4STIwKxTnkBAKHiXpFP4AXLo+91DJ+dCaO3H3msZUdAnZhmC/68UUL9 =JvkN -----END PGP SIGNATURE----- --WtLsfkW6gRUJWmcm8qJvVGTj7lqtrbj51--