mirror of
https://github.com/ipxe/ipxe
synced 2026-02-12 21:29:39 +03:00
[settings] Explicitly separate the concept of a completed fetched setting
The fetch_setting() family of functions may currently modify the definition of the specified setting (e.g. to add missing type information). Clean up this interface by requiring callers to provide an explicit buffer to contain the completed definition of the fetched setting, if required. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -100,8 +100,8 @@ static void rootcert_init ( void ) {
|
||||
/* Fetch copy of "trust" setting, if it exists. This
|
||||
* memory will never be freed.
|
||||
*/
|
||||
if ( ( len = fetch_setting_copy ( NULL, &trust_setting,
|
||||
&external ) ) >= 0 ) {
|
||||
if ( ( len = fetch_raw_setting_copy ( NULL, &trust_setting,
|
||||
&external ) ) >= 0 ) {
|
||||
root_certificates.fingerprints = external;
|
||||
root_certificates.count = ( len / FINGERPRINT_LEN );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user