[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: debug prints
From: |
Serbinenko Vladimir |
Subject: |
Re: debug prints |
Date: |
Sun, 23 Jan 2005 19:25:17 +0100 |
User-agent: |
Mozilla Thunderbird 1.0 (X11/20041206) |
P.S. You can do debug with bit mask like
#define DEBUG_COMMANDS 1
#define DEBUG_FILESYSTEM 2
#define DEBUG_OTHER 4
and then
int grub_debug_printf (int level,const char *fmt, ...)
{
va_list ap;
int ret;
char*end;
if (! grub_env_get("debug") ||
!(grub_strtoul(grub_env_get("debug"),&end,0)&level))
return;
grub_printf("Debug level %d:",level);
va_start (ap, fmt);
ret = grub_vprintf (fmt, ap);
va_end (ap);
return ret;
}