From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1RvDz9-0007vt-VT for mharc-grub-devel@gnu.org; Wed, 08 Feb 2012 15:19:23 -0500 Received: from eggs.gnu.org ([140.186.70.92]:60887) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvDz4-0007sj-KV for grub-devel@gnu.org; Wed, 08 Feb 2012 15:19:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvDz0-00078d-L4 for grub-devel@gnu.org; Wed, 08 Feb 2012 15:19:18 -0500 Received: from cavan.codon.org.uk ([93.93.128.6]:55875) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvDz0-00078H-Gy for grub-devel@gnu.org; Wed, 08 Feb 2012 15:19:14 -0500 Received: from mjg59 by cavan.codon.org.uk with local (Exim 4.72) (envelope-from ) id 1RvDyy-00026l-6A; Wed, 08 Feb 2012 20:19:12 +0000 Date: Wed, 8 Feb 2012 20:19:11 +0000 From: Matthew Garrett To: Vladimir =?utf-8?Q?'=CF=86-coder=2Fphcoder'?= Serbinenko Subject: Re: [PATCH 2/4] Add grub_efi_get_variable Message-ID: <20120208201911.GA8098@srcf.ucam.org> References: <1328719918-4789-1-git-send-email-mjg@redhat.com> <1328719918-4789-3-git-send-email-mjg@redhat.com> <4F32D33B.80000@gmail.com> <20120208200434.GA7865@srcf.ucam.org> <4F32D673.2070402@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4F32D673.2070402@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: mjg59@cavan.codon.org.uk X-SA-Exim-Scanned: No (on cavan.codon.org.uk); SAEximRunCond expanded to false X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 93.93.128.6 Cc: The development of GNU GRUB X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2012 20:19:22 -0000 On Wed, Feb 08, 2012 at 09:09:23PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > On 08.02.2012 21:04, Matthew Garrett wrote: > >On Wed, Feb 08, 2012 at 08:55:39PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > >>>+ for (i=0; i<(int)grub_strlen((char *)var); i++) > >>>+ var16[i] = var[i]; > >>>+ var16[i] = '\0'; > >>>+ > >>We use grub_utf8_to_utf16. Also don't forget to multiply the malloc > >>length by GRUB_MAX_UTF16_PER_UTF8 ((GRUB_MAX_UTF16_PER_UTF8 * length > >>+ 1) * sizeof (var16[0])) > >That's not currently exported. Any problem with changing that? > It already is. The prototype and the define is in grub/charset.h Oh, I was thinking of modules, but then this is already in core. Yes, I'll do that. -- Matthew Garrett | mjg59@srcf.ucam.org