[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/4] Add grub_efi_get_variable

From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: [PATCH 2/4] Add grub_efi_get_variable
Date: Wed, 08 Feb 2012 21:29:35 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20120104 Icedove/8.0

On 08.02.2012 21:19, Matthew Garrett wrote:
On Wed, Feb 08, 2012 at 09:09:23PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko 
On 08.02.2012 21:04, Matthew Garrett wrote:
On Wed, Feb 08, 2012 at 08:55:39PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko 
+  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.
grub_utf8_to_utf16 is in normal.mod. The easiest way to fix this problem is to inline grub_utf8_to_utf16. It's used only in 2 other different places.

Vladimir 'φ-coder/phcoder' Serbinenko

reply via email to

[Prev in Thread] Current Thread [Next in Thread]