On Thu, 24 Feb 2005, Hollis Blanchard wrote: > On Feb 24, 2005, at 1:30 PM, Yoshinori K. Okuji wrote: > > > On Thursday 24 February 2005 09:02, Vincent Pelletier wrote: > >> Iirc there were differences of point of view on that matter. > >> Okuji, what do you think about that idea ? > > > > What I said was that you should use strings instead of bit fields. > > [...] > > Here you don't have to use bit fields (such as DEBUG_MODE_FS_BIT) at > > all. When dprintf is called, dprintf simply check if a specified > > category is included in the variable "debug". Like this: > > Ah ok, so the call would look like this: > grub_dprintf("disk", "reading block %i", blockno); > > Although that could lend itself to difficult-to-detect typos. Perhaps a > #define would be useful after all: > #define GRUB_DBG_DISK "disk" > grub_dprintf(GRUB_DBG_DISK, "reading block %i", blockno); > > Ah, I see Vincent's patch already does what's needed with the > grub_dprintf macro, so it's just the conditional output he's working on > in grub_real_dprintf. Sounds good. :) > > -Hollis > > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel >
Why do you use strings instead of numbers? Use of bitmask would allow pretty simple config file entry like debug=1231. Just a thought. Aki Tossavainen _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel