From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by befuddled.reisers.ca (Postfix, from userid 65534) id CC7611EF9C3; Tue, 15 Mar 2016 16:35:14 -0400 (EDT) Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138]) by befuddled.reisers.ca (Postfix) with ESMTPS id DA6EB1EF9B8 for ; Tue, 15 Mar 2016 16:35:12 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 9258D200F8; Tue, 15 Mar 2016 21:35:02 +0100 (CET) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LbzDBM1KfH3C; Tue, 15 Mar 2016 21:35:02 +0100 (CET) Received: from var.youpi.perso.aquilenet.fr (LFbn-1-6757-94.w90-120.abo.wanadoo.fr [90.120.189.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 0639A200F3; Tue, 15 Mar 2016 21:35:00 +0100 (CET) Received: from samy by var.youpi.perso.aquilenet.fr with local (Exim 4.86_2) (envelope-from ) id 1afvgB-0007N5-EM; Tue, 15 Mar 2016 21:34:59 +0100 Date: Tue, 15 Mar 2016 21:34:59 +0100 From: Samuel Thibault To: William Hubbs , Chris Brannon , Greg Kroah-Hartman , speakup@linux-speakup.org, linux-kernel@vger.kernel.org Subject: [PATCH] Staging: speakup: Clear hi font bit from attributes Message-ID: <20160315203459.GR3553@var.home> Mail-Followup-To: Samuel Thibault , William Hubbs , Chris Brannon , Greg Kroah-Hartman , speakup@linux-speakup.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 X-BeenThere: speakup@linux-speakup.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Speakup is a screen review system for Linux." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Mar 2016 20:35:14 -0000 Previously, speakup would see the hi-font bit in attributes. Since this bit has nothing to do with attributes, we need to clear it. Signed-off-by: Samuel Thibault --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -267,7 +267,7 @@ static struct notifier_block vt_notifier static unsigned char get_attributes(struct vc_data *vc, u16 *pos) { pos = screen_pos(vc, pos - (u16 *)vc->vc_origin, 1); - return (u_char) (scr_readw(pos) >> 8); + return (scr_readw(pos) & ~vc->vc_hi_font_mask) >> 8; } static void speakup_date(struct vc_data *vc) @@ -477,8 +477,10 @@ static u16 get_char(struct vc_data *vc, w = scr_readw(pos); c = w & 0xff; - if (w & vc->vc_hi_font_mask) + if (w & vc->vc_hi_font_mask) { + w &= ~vc->vc_hi_font_mask; c |= 0x100; + } ch = inverse_translate(vc, c, 0); *attribs = (w & 0xff00) >> 8;