Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MfCn6-0006AV-Io for mharc-grub-devel@gnu.org; Sun, 23 Aug 2009 09:07:24 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MfCn5-00068W-5I for grub-devel@gnu.org; Sun, 23 Aug 2009 09:07:23 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MfCn0-00061K-Cq for grub-devel@gnu.org; Sun, 23 Aug 2009 09:07:22 -0400 Received: from [199.232.76.173] (port=33100 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MfCn0-000612-22 for grub-devel@gnu.org; Sun, 23 Aug 2009 09:07:18 -0400 Received: from xvm-190-8.ghst.net ([217.70.190.8]:59546 helo=aybabtu.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MfCmz-0000zG-GM for grub-devel@gnu.org; Sun, 23 Aug 2009 09:07:17 -0400 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtp (Exim 4.69) (envelope-from ) id 1MfCmw-0008PJ-H0; Sun, 23 Aug 2009 15:07:14 +0200 Received: from rmh by thorin with local (Exim 4.69) (envelope-from ) id 1MfCmv-0005pL-Vq; Sun, 23 Aug 2009 15:07:13 +0200 Date: Sun, 23 Aug 2009 15:07:13 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20090823130713.GD22272@thorin> References: <8FB98151-B0A2-4308-A065-15607AE9E8D8@gmail.com> <20090718185800.GJ8867@thorin> <0CC61931-97E9-4B53-8B86-37129AE84218@gmail.com> <20090722172709.GF8706@thorin> <1F7F9766-ABCD-4190-AA2D-C028D6348094@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1F7F9766-ABCD-4190-AA2D-C028D6348094@gmail.com> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: Joe Auricchio Subject: Re: [PATCH] Clear out gfxterm's virtual text_buffer - fixes junk at end of lines X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Aug 2009 13:07:23 -0000 On Wed, Jul 22, 2009 at 10:42:54AM -0700, Joe Auricchio wrote: >> >> So perhaps this can be solved simpler by replacing grub_malloc with >> grub_zalloc ? > > I saw the zalloc commit and thought the same thing! :D I'll test it. But > fg_color and bg_color must be set to the screen's current colors, which > may not be zero. > > I just discovered that > - this patch to grub_virtual_screen_setup() > - scroll_up() line 579 /* Clear last line in text buffer. */, and > - grub_virtual_screen_cls() > do the same thing. > > An opportunity to refactor? I'll look into this. Hi, Note that the initial patch was committed due to lack of coordination (there's been a period in which we've been sloppy due to lack of leadership, but this won't happen again). Nevertheless, the initial approach is probably not correct; my impression is that it should be using grub_zalloc() instead. If you're still interested, I'd appreciate if you could fix that. Thanks -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."