diff mbox

lib: fwts_uefi: fixed the newer inteface never be used

Message ID 1362124280-24000-1-git-send-email-ivan.hu@canonical.com
State Accepted
Headers show

Commit Message

Ivan Hu March 1, 2013, 7:51 a.m. UTC
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(-)

Comments

Colin Ian King March 1, 2013, 8:02 a.m. UTC | #1
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. UTC | #2
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>
diff mbox

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;
 				}