aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdwin <edwindecaluwe@gmail.com>2014-01-15 19:57:54 -0600
committerJames Bottomley <JBottomley@Parallels.com>2014-01-18 08:31:18 -0800
commit9af07a90a3e2246be5a7d01e3a037cfa731eb5dc (patch)
treeaea41f12c25cd1c2d3bfd8af7ce694db034ec53d
parent272314ecc87f338fbe48048de4ead22553f53890 (diff)
downloadefitools-9af07a90a3e2246be5a7d01e3a037cfa731eb5dc.tar.gz
kernel_efivars: Fix detection of efivarfs filesystem path.
Make init correctly detect the efivarfs filesystem path based on mount output. Before this patch code only works when the efivarfs filesystem is the last entry in the mount output. Signed-off-by: Edwin de Caluwe <edwindecaluwe@gmail.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--lib/kernel_efivars.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/kernel_efivars.c b/lib/kernel_efivars.c
index 3c5852c..7c42ac4 100644
--- a/lib/kernel_efivars.c
+++ b/lib/kernel_efivars.c
@@ -68,8 +68,8 @@ kernel_variable_init(void)
sscanf(ptr, "%*s on %s type %s %*s\n%n", path, type, &count);
ptr += count;
- if (strcmp(type, "efivarfs") != 0)
- continue;
+ if (strcmp(type, "efivarfs") == 0)
+ break;
}
if (strcmp(type, "efivarfs") != 0) {
fprintf(stderr, "No efivarfs filesystem is mounted\n");