[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:
@@ -68,8 +68,8 @@ static int pciscan_exec ( int argc, char **argv ) {
|
||||
goto err_parse_setting;
|
||||
|
||||
/* Determine starting bus:dev.fn address */
|
||||
if ( ( len = fetch_uint_setting ( setting.settings, &setting.setting,
|
||||
&prev ) ) < 0 ) {
|
||||
if ( ( len = fetchn_setting ( setting.settings, &setting.setting,
|
||||
NULL, &setting.setting, &prev ) ) < 0 ) {
|
||||
/* Setting not yet defined: start searching from 00:00.0 */
|
||||
prev = 0;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user