Patchwork lib: fwts_uefi: fixed the newer inteface never be used

login
register
mail settings
Submitter Ivan Hu
Date March 1, 2013, 7:51 a.m.
Message ID <1362124280-24000-1-git-send-email-ivan.hu@canonical.com>
Download mbox | patch
Permalink /patch/224247/
State Accepted
Headers show

Comments

Ivan Hu - March 1, 2013, 7:51 a.m.
The new interface efivars for UEFI variable should alway be find first.

Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
---
 src/lib/src/fwts_uefi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Colin King - March 1, 2013, 8:02 a.m.
On 01/03/13 07:51, Ivan Hu wrote:
> The new interface efivars for UEFI variable should alway be find first.
>
> Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
> ---
>   src/lib/src/fwts_uefi.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/lib/src/fwts_uefi.c b/src/lib/src/fwts_uefi.c
> index 53fa810..9118ea4 100644
> --- a/src/lib/src/fwts_uefi.c
> +++ b/src/lib/src/fwts_uefi.c
> @@ -96,7 +96,7 @@ static int fwts_uefi_get_interface(char **path)
>
>   			if (fscanf(fp, "%*s %4095s %1023s", mount, fstype) == 2) {
>   				/* Always try to find the newer interface first */
> -				if (!strcmp(fstype, "efivars")) {
> +				if (!strcmp(fstype, "efivarfs")) {
>   					strcpy(efivar_path, mount);
>   					break;
>   				}
>

I wonder if this originally worked because I developed this against 
early prototype code before it landed in the kernel.  Thanks for 
spotting this.

Acked-by: Colin Ian King <colin.king@canonical.com>
Keng-Yu Lin - March 7, 2013, 5:42 a.m.
On Fri, Mar 1, 2013 at 3:51 PM, Ivan Hu <ivan.hu@canonical.com> wrote:
> The new interface efivars for UEFI variable should alway be find first.
>
> Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
> ---
>  src/lib/src/fwts_uefi.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/lib/src/fwts_uefi.c b/src/lib/src/fwts_uefi.c
> index 53fa810..9118ea4 100644
> --- a/src/lib/src/fwts_uefi.c
> +++ b/src/lib/src/fwts_uefi.c
> @@ -96,7 +96,7 @@ static int fwts_uefi_get_interface(char **path)
>
>                         if (fscanf(fp, "%*s %4095s %1023s", mount, fstype) == 2) {
>                                 /* Always try to find the newer interface first */
> -                               if (!strcmp(fstype, "efivars")) {
> +                               if (!strcmp(fstype, "efivarfs")) {
>                                         strcpy(efivar_path, mount);
>                                         break;
>                                 }
> --
> 1.7.10.4
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>

Patch

diff --git a/src/lib/src/fwts_uefi.c b/src/lib/src/fwts_uefi.c
index 53fa810..9118ea4 100644
--- a/src/lib/src/fwts_uefi.c
+++ b/src/lib/src/fwts_uefi.c
@@ -96,7 +96,7 @@  static int fwts_uefi_get_interface(char **path)
 
 			if (fscanf(fp, "%*s %4095s %1023s", mount, fstype) == 2) {
 				/* Always try to find the newer interface first */
-				if (!strcmp(fstype, "efivars")) {
+				if (!strcmp(fstype, "efivarfs")) {
 					strcpy(efivar_path, mount);
 					break;
 				}