grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problem in usage of grub_errno...


From: Vesa Jääskeläinen
Subject: problem in usage of grub_errno...
Date: Fri, 09 Dec 2005 23:58:25 +0200
User-agent: Thunderbird 1.4.1 (Windows/20051006)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]