diff options
author | Nayna Jain <nayna@linux.ibm.com> | 2020-09-16 11:21:16 -0500 |
---|---|---|
committer | Oliver O'Halloran <oohall@gmail.com> | 2020-10-01 13:44:06 +1000 |
commit | c5c71a51616b6011c5a1ff59feb3618df6beb5b0 (patch) | |
tree | b4194bfaa410996b865ffa4ffca3c7da0879d716 /libstb | |
parent | b3a13fea4f57df9ce2b0c91f91a30d12af38b358 (diff) | |
download | skiboot-c5c71a51616b6011c5a1ff59feb3618df6beb5b0.zip skiboot-c5c71a51616b6011c5a1ff59feb3618df6beb5b0.tar.gz skiboot-c5c71a51616b6011c5a1ff59feb3618df6beb5b0.tar.bz2 |
secvar: change backend hook interface to take in bank references
Previously, backends were implicitly expected to operate on global
references to the variable and update banks. This patch changes the
interface for this driver to instead take the banks in as an argument.
This removes the implict dependency on these references, makes the
design consistent with the storage driver, and also will simplify unit
testing of these functions.
Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
Signed-off-by: Eric Richter <erichte@linux.ibm.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'libstb')
-rw-r--r-- | libstb/secvar/secvar_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libstb/secvar/secvar_main.c b/libstb/secvar/secvar_main.c index d873762..759d8ef 100644 --- a/libstb/secvar/secvar_main.c +++ b/libstb/secvar/secvar_main.c @@ -65,7 +65,7 @@ int secvar_main(struct secvar_storage_driver storage_driver, secvar_set_status("okay"); if (secvar_backend.pre_process) { - rc = secvar_backend.pre_process(); + rc = secvar_backend.pre_process(&variable_bank, &update_bank); if (rc) { prlog(PR_ERR, "Error in backend pre_process = %d\n", rc); /* Early failure state, lock the storage */ @@ -79,7 +79,7 @@ int secvar_main(struct secvar_storage_driver storage_driver, goto soft_fail; /* Process variable updates from the update bank. */ - rc = secvar_backend.process(); + rc = secvar_backend.process(&variable_bank, &update_bank); /* Create and set the update-status device tree property */ secvar_set_update_status(rc); @@ -109,7 +109,7 @@ int secvar_main(struct secvar_storage_driver storage_driver, secvar_storage.lockdown(); if (secvar_backend.post_process) { - rc = secvar_backend.post_process(); + rc = secvar_backend.post_process(&variable_bank, &update_bank); if (rc) { prlog(PR_ERR, "Error in backend post_process = %d\n", rc); goto soft_fail; |