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. # This enables the debug mode for fs and disk. debug="fs disk" ...execute commands... # This disable the debug mode. debug="" 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: enabled = 0; if (grub_strstr (debug, "all")) enabled = 1; else if (grub_strstr (debug, category)) enabled = 1; Actually, strstr is not appropriate, because it does not consider word boundaries. Strings are much better because of the flexibility. Okuji _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel