Drop duplicated code in rebased efivars patch
svn path=/dists/sid/linux/; revision=20016
This commit is contained in:
parent
ca432f1977
commit
1b8b7e7f86
|
@ -25,7 +25,7 @@ efi_pstore will be robust against a kernel panic in an interrupt context with th
|
|||
Signed-off-by: Seiji Aguchi <seiji.aguchi@hds.com>
|
||||
Acked-by: Matt Fleming <matt.fleming@intel.com>
|
||||
Signed-off-by: Tony Luck <tony.luck@intel.com>
|
||||
[bwh: Backported to 3.8: adjust context]
|
||||
[bwh: Backported to 3.8.y: adjust context; drop changes included in 3.8.6]
|
||||
---
|
||||
drivers/firmware/efivars.c | 85 +++++++++++++++++++++++++++++++++++++++++---
|
||||
include/linux/efi.h | 3 +-
|
||||
|
@ -61,32 +61,10 @@ Signed-off-by: Tony Luck <tony.luck@intel.com>
|
|||
|
||||
*id = part;
|
||||
return ret;
|
||||
@@ -1717,6 +1721,75 @@ static unsigned long var_name_strnsize(e
|
||||
@@ -1717,6 +1721,53 @@ static unsigned long var_name_strnsize(e
|
||||
return min(len, variable_name_size);
|
||||
}
|
||||
|
||||
+static bool variable_is_present(efi_char16_t *variable_name, efi_guid_t *vendor)
|
||||
+{
|
||||
+ struct efivar_entry *entry, *n;
|
||||
+ struct efivars *efivars = &__efivars;
|
||||
+ unsigned long strsize1, strsize2;
|
||||
+ bool found = false;
|
||||
+
|
||||
+ strsize1 = utf16_strsize(variable_name, 1024);
|
||||
+ list_for_each_entry_safe(entry, n, &efivars->list, list) {
|
||||
+ strsize2 = utf16_strsize(entry->var.VariableName, 1024);
|
||||
+ if (strsize1 == strsize2 &&
|
||||
+ !memcmp(variable_name, &(entry->var.VariableName),
|
||||
+ strsize2) &&
|
||||
+ !efi_guidcmp(entry->var.VendorGuid,
|
||||
+ *vendor)) {
|
||||
+ found = true;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ return found;
|
||||
+}
|
||||
+
|
||||
+static void efivar_update_sysfs_entries(struct work_struct *work)
|
||||
+{
|
||||
+ struct efivars *efivars = &__efivars;
|
||||
|
@ -137,7 +115,7 @@ Signed-off-by: Tony Luck <tony.luck@intel.com>
|
|||
/*
|
||||
* Let's not leave out systab information that snuck into
|
||||
* the efivars driver
|
||||
@@ -2087,6 +2160,8 @@ err_put:
|
||||
@@ -2087,6 +2138,8 @@ err_put:
|
||||
static void __exit
|
||||
efivars_exit(void)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue