From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1EoNC6-0002fo-7K for mharc-grub-devel@gnu.org; Mon, 19 Dec 2005 10:44:58 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EoNBb-0002M3-SO for grub-devel@gnu.org; Mon, 19 Dec 2005 10:44:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EoNBQ-00027e-1e for grub-devel@gnu.org; Mon, 19 Dec 2005 10:44:16 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EoNAk-0001JP-AS for grub-devel@gnu.org; Mon, 19 Dec 2005 10:43:34 -0500 Received: from [81.228.11.159] (helo=pne-smtpout2-sn1.fre.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EoNDi-0005eb-0i for grub-devel@gnu.org; Mon, 19 Dec 2005 10:46:38 -0500 Received: from [80.222.173.234] (80.222.173.234) by pne-smtpout2-sn1.fre.skanova.net (7.2.069.1) id 43A6B2330000E0BA for grub-devel@gnu.org; Mon, 19 Dec 2005 16:42:39 +0100 Message-ID: <43A6D4F8.5060405@nic.fi> Date: Mon, 19 Dec 2005 17:42:48 +0200 From: =?ISO-8859-2?Q?Vesa_J=E4=E4skel=E4inen?= User-Agent: Thunderbird 1.4.1 (Windows/20051006) MIME-Version: 1.0 To: The development of GRUB 2 References: <4399FE01.7010402@nic.fi> <87mzj9q4z7.fsf@xs4all.nl> <439AA87B.9050607@nic.fi> <200512101411.11612.okuji@enbug.org> <439B369D.7020909@nic.fi> <43A44DA4.5090601@nic.fi> <1652.62.240.162.34.1134860376.squirrel@drak.ucw.cz> <43A49C6B.1080408@nic.fi> <1067.62.240.162.34.1134981456.squirrel@drak.ucw.cz> In-Reply-To: <1067.62.240.162.34.1134981456.squirrel@drak.ucw.cz> X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: Quoted-Printable Subject: Re: problem in usage of grub_errno... X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2005 15:44:54 -0000 Tom=E1=B9 Ebenlendr wrote: >> Error stack is statically allocated and it is protected so that it >> cannot overflow. Error stack is defined as being static to file >> kern/err.c so there is no direct access possible to error stack. >> >> Error stack is emptied in grub_print_error function. (And this is call= ed >> before prompt is printed to screen) >> >> Idea of the error stack is to record all error messages before they ar= e >> printed. >> >> Or did I miss your idea with the "unwanted stack overflow" ? >=20 > Okay. There is only minor issue then, that some loop over same > error pushing function may fill up the stack. But it is not problem > if first error (in the stack) and last error (in grub_errno) is printed > (at prompt time). Yes it is possible that some part might fill up the stack, that's way there is a protection. When error is printed, whole stack will be dumped to screen. So all error stack entries containing error code other than GRUB_ERR_NONE will get displayed. My idea is not to use this error stacking feature in all the place. Only in places where there is a need to have a clean error state (grub_errno =3D=3D GRUB_ERR_NONE). This is because if grub_errno is being set, some functions are required to fail.