All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fbcon: Fix endian bug in fbcon_putc (console mouse problem)
@ 2004-10-27 22:11 Antonino A. Daplas
  0 siblings, 0 replies; only message in thread
From: Antonino A. Daplas @ 2004-10-27 22:11 UTC (permalink / raw)
  To: Andrew Morton, Linus Torvalds; +Cc: Linux Fbdev development list

The typecast (const unsigned short *) &c in fbcon_putc is not correct for
big-endian machines.  This problem manifests as a black cursor that can be
used to erase the console screen contents.  The correct fix is to use scr_writew
instead.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
---
 fbcon.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

diff -Nru a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
--- a/drivers/video/console/fbcon.c	2004-10-26 23:49:13 +08:00
+++ b/drivers/video/console/fbcon.c	2004-10-27 09:07:57 +08:00
@@ -1012,7 +1012,10 @@
 
 static void fbcon_putc(struct vc_data *vc, int c, int ypos, int xpos)
 {
-	fbcon_putcs(vc, (const unsigned short *) &c, 1, ypos, xpos);
+	unsigned short chr;
+
+	scr_writew(c, &chr);
+	fbcon_putcs(vc, &chr, 1, ypos, xpos);
 }
 
 static void fbcon_clear_margins(struct vc_data *vc, int bottom_only)




-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-10-27 22:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-27 22:11 [PATCH] fbcon: Fix endian bug in fbcon_putc (console mouse problem) Antonino A. Daplas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.