[PATCH 15/16] fs: efivars: read the attributes on the second get_variable()
Michael Olbrich
m.olbrich at pengutronix.de
Fri Jul 17 12:22:48 PDT 2015
Some EFI get_variable() implementations don't set the attributes when
returning EFI_BUFFER_TOO_SMALL.
Signed-off-by: Michael Olbrich <m.olbrich at pengutronix.de>
---
fs/efivarfs.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/fs/efivarfs.c b/fs/efivarfs.c
index 87fc771739e2..c7a282b05c63 100644
--- a/fs/efivarfs.c
+++ b/fs/efivarfs.c
@@ -216,7 +216,7 @@ static int efivarfs_open(struct device_d *dev, FILE *f, const char *filename)
return -ENOENT;
efiret = RT->get_variable(efile->name, &efile->vendor,
- &efile->attributes, &efile->size, NULL);
+ NULL, &efile->size, NULL);
if (EFI_ERROR(efiret) && efiret != EFI_BUFFER_TOO_SMALL) {
ret = -efi_errno(efiret);
goto out;
@@ -228,8 +228,9 @@ static int efivarfs_open(struct device_d *dev, FILE *f, const char *filename)
goto out;
}
- efiret = RT->get_variable(efile->name, &efile->vendor, NULL, &efile->size,
- efile->buf);
+ efiret = RT->get_variable(efile->name, &efile->vendor,
+ &efile->attributes, &efile->size,
+ efile->buf);
if (EFI_ERROR(efiret)) {
ret = -efi_errno(efiret);
goto out;
--
2.1.4
More information about the barebox
mailing list