All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vesa Jääskeläinen" <chaac@nic.fi>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: problem in usage of grub_errno...
Date: Mon, 19 Dec 2005 17:42:48 +0200	[thread overview]
Message-ID: <43A6D4F8.5060405@nic.fi> (raw)
In-Reply-To: <1067.62.240.162.34.1134981456.squirrel@drak.ucw.cz>

Tomáš 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 called
>> before prompt is printed to screen)
>>
>> Idea of the error stack is to record all error messages before they are
>> printed.
>>
>> Or did I miss your idea with the "unwanted stack overflow" ?
> 
> 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
== GRUB_ERR_NONE). This is because if grub_errno is being set, some
functions are required to fail.



      reply	other threads:[~2005-12-19 15:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-09 21:58 problem in usage of grub_errno Vesa Jääskeläinen
2005-12-09 22:29 ` Marco Gerards
2005-12-10 10:05   ` Vesa Jääskeläinen
2005-12-10 13:11     ` Yoshinori K. Okuji
2005-12-10 20:12       ` Vesa Jääskeläinen
2005-12-17 17:40         ` Vesa Jääskeläinen
2005-12-17 22:59           ` Tomáš Ebenlendr
2005-12-17 23:16             ` Vesa Jääskeläinen
2005-12-19  5:15               ` Joel Buckley
2005-12-19 15:35                 ` Vesa Jääskeläinen
2005-12-19  8:37               ` Tomáš Ebenlendr
2005-12-19 15:42                 ` Vesa Jääskeläinen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43A6D4F8.5060405@nic.fi \
    --to=chaac@nic.fi \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.