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: problem in usage of grub_errno...
Date: Fri, 09 Dec 2005 23:58:25 +0200	[thread overview]
Message-ID: <4399FE01.7010402@nic.fi> (raw)

Some folks might have overlooked my earlier post as I wrote it to video
subsystem thread. As this problem needs some kind of resolution and it
affects larger area of code than just video subsystem it needs to be
discussed first.

Problem is this:
1. error occures and grub_errno is being set to something else than
GRUB_ERR_NONE (0).
2. now some operation needs to read from disk, but it will fail as
gurb_errno was set.

Real world example:
Let's assume that there is a file not found exception. There is graphics
mode activated and not all fonts are cached in memory (as is currently
the case). Now as file not found exception sets grub_errno to
GRUB_ERR_FILE_NOT_FOUND and most likely sets some string to grub_errmsg.
 All is good so far. But when the actual rendering happens, and font
manager tries to read font data from disk it fails, because grub_errno
is set. In many place there is code like this "if (grub_errno) return
grub_errno;" in file system code and in disk drivers. Now if grub_errno
is set else where this code will fail, even if there wasn't really i/o
error.

There could be other places where before printing out the error message
could come another error message and it would replace older error
message and it not get users attention. This could at best hide the real
problem from user and make it harder for user fixing the issue.

This problem _must_ be solved somehow. Either implementing more advanced
error reporting system and/or file system & disk code must be corrected.
I can try to modify those myself, but I think it would be wise if
someone how knows fs/disk code better would fix those.



             reply	other threads:[~2005-12-09 21:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-09 21:58 Vesa Jääskeläinen [this message]
2005-12-09 22:29 ` problem in usage of grub_errno 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

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=4399FE01.7010402@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.