grub-devel
[Top][All Lists]
Advanced

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

[PATCH] use of grub_dprintf in grub_mm_init_region() is misleading


From: Robert Millan
Subject: [PATCH] use of grub_dprintf in grub_mm_init_region() is misleading
Date: Wed, 23 Jan 2008 14:18:55 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Using grub_dprintf() in grub_mm_init_region() easily leads to think that one
can activate this debug message by issuing `grub_env_set ("debug", "mem")' in
grub_machine_init(), before memory initialisation.

However, that's completely false.  grub_env_set will silently [1] ignore your
call because grub_malloc() ain't usable, possibly making you think for a while
that no free memory was found, and that memory was not initialized at all!

I propose turning it into a disabled grub_printf().

[1] well, it'll return an error code.  but who remembers about checking that?

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)

Attachment: mem_dprintf.diff
Description: Text Data


reply via email to

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