On Wed, Oct 10, 2007 at 11:57:44PM +0200, Marcin Kurek wrote: > > In your code there's a condition in which _serial is set to 0 and _fb is > > left unset (as 0). Is this intended? Sounds like a bug. > > Not this is not a bug. We can heve 3 cases here: > > 1) True serial console. In this case recent versions of OF set stdout > name and type to "serial" (_serial = 1, _fb = 0) In this case we want > to use simple frames. > > 2) On the screen terminal without framebuffer (fb-mode not existing or > set to 0x0x0) In this case we will get type "serial" (As it not > supports pixel operations) and name "display" as this is not real > serial console. (_serial = 0, _fb = 0) In this case we can use cp437 > frames. > > For old versions of OF this case need to catch "bootconsole" too. > > 3) Console with framebuffer (fb-mode != 0x0x0) In this case we will > get type to "display" or "vga" (_serial = 0, _fb = 1) In this case we > can not use cp437 frames as vga font used by OF maps only first 127 > characters ;( I put this in to separate case as we can still use > framebuffer interface to draw some frames or try to load a working > font, etc. > > I use 'true serial' as a safe default if detection fails for some reasons.
Ok but do we really need to make that distinction? Perhaps it would be simpler to define a structure that only cares about charset capability, and make code that plays with charsets just check that, without caring if it's a serial cable or a vga with old firmware, etc. And possibly this could be integrated with your proposed use of grub_term.flags ? (I'm not sure if that would make sense, but it would be nice to simplify if possible) -- 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 /.) _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel