[PATCH] Braille screen reader fixes

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>, <linux-kernel@...>, Dmitry Torokhov <dtor@...>, Jiri Kosina <jkosina@...>
Date: Saturday, February 23, 2008 - 9:15 am

Braille screen reader fixes:
- console_cmdline's brl_options field is only required when braille
console support is enabled.
- Use strlcpy to copy the console name.
- braille console support depends on VT support.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

--- linux-2.6.24.1-orig/kernel/printk.c	2008-02-21 12:09:06.000000000 +0100
+++ linux-2.6.24.1-perso/kernel/printk.c	2008-02-23 12:57:42.000000000 +0100
@@ -105,7 +105,9 @@ struct console_cmdline
 	char	name[8];			/* Name of the driver	    */
 	int	index;				/* Minor dev. to use	    */
 	char	*options;			/* Options for the driver   */
+#ifdef CONFIG_A11Y_BRAILLE_CONSOLE
 	char	*brl_options;			/* Options for braille driver */
+#endif
 };
 
 #define MAX_CMDLINECONSOLES 8
@@ -789,10 +791,11 @@ static int __add_preferred_console
 	if (!brl_options)
 		selected_console = i;
 	c = &console_cmdline[i];
-	memcpy(c->name, name, sizeof(c->name));
-	c->name[sizeof(c->name) - 1] = 0;
+	strlcpy(c->name, name, sizeof(c->name));
 	c->options = options;
+#ifdef CONFIG_A11Y_BRAILLE_CONSOLE
 	c->brl_options = brl_options;
+#endif
 	c->index = idx;
 	return 0;
 }
--- linux-2.6.24.1-orig/drivers/accessibility/Kconfig	2008-02-23 13:32:38.000000000 +0100
+++ linux-2.6.24.1-perso/drivers/accessibility/Kconfig	2008-02-23 13:23:21.000000000 +0100
@@ -8,6 +8,7 @@ menuconfig ACCESSIBILITY
 if ACCESSIBILITY
 config A11Y_BRAILLE_CONSOLE
 	bool "Console on braille device"
+	depends on VT
 	depends on SERIAL_CORE_CONSOLE
 	---help---
 	  Enables console output on a braille device connected to a 8250
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Basic braille screen reader support, Samuel Thibault, (Sun Feb 3, 11:18 pm)
[PATCH,RESEND] Basic braille screen reader support, Samuel Thibault, (Tue Feb 5, 6:00 pm)
Re: [PATCH,RESEND] Basic braille screen reader support, Andrew Morton, (Tue Feb 5, 8:58 pm)
Re: [PATCH,RESEND] Basic braille screen reader support, Samuel Thibault, (Tue Feb 5, 10:04 pm)
[PATCH2] Basic braille screen reader support, Samuel Thibault, (Thu Feb 21, 8:28 pm)
Re: [PATCH2] Basic braille screen reader support, Andrew Morton, (Sat Feb 23, 4:04 am)
Re: [PATCH2] Basic braille screen reader support, Samuel Thibault, (Sat Feb 23, 9:10 am)
Re: [PATCH2] Basic braille screen reader support, Samuel Thibault, (Wed Apr 23, 8:39 pm)
Re: [PATCH2] Basic braille screen reader support, Alan Cox, (Thu Apr 24, 6:21 am)
Re: [PATCH2] Basic braille screen reader support, Samuel Thibault, (Thu Apr 24, 7:09 am)
Re: [PATCH2] Basic braille screen reader support, Andrew Morton, (Thu Apr 24, 12:46 am)
[PATCH] Braille screen reader documentation, Samuel Thibault, (Sat Feb 23, 9:17 am)
[PATCH] Braille screen reader fixes, Samuel Thibault, (Sat Feb 23, 9:15 am)
Re: [PATCH] Basic braille screen reader support, Samuel Thibault, (Mon Feb 4, 1:24 pm)
Re: [PATCH] Basic braille screen reader support, Samuel Thibault, (Mon Feb 4, 2:15 pm)
Re: [PATCH] Basic braille screen reader support, Samuel Thibault, (Sun Feb 3, 11:22 pm)