[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
debug prints
From: |
Hollis Blanchard |
Subject: |
debug prints |
Date: |
Sun, 23 Jan 2005 12:10:44 -0600 |
What would you guys think of something like this:
int grub_debug;
int grub_debug_printf (const char *fmt, ...)
{
va_list ap;
int ret;
if (! grub_debug)
return;
va_start (ap, fmt);
ret = grub_vprintf (fmt, ap);
va_end (ap);
return ret;
}
Then grub_debug can be set at runtime to enable debugging messages,
which could be quite helpful. If we wanted to get fancy, we could turn
grub_debug into a set of flags (e.g. FILESYSTEM, PARTITION, DISK,
LINUX, MEMORY) to selectively debug specific systems.
-Hollis
- debug prints,
Hollis Blanchard <=