[settings] Clarify usage of the term "named setting"

There are currently two conflicting usages of the term "named setting"
within iPXE: one refers to predefined settings (such as show up in the
"config" UI), the other refers to settings identified by a name (such
as "net0.dhcp/ip").

Split these usages into the term "predefined setting" and "named
setting" to avoid ambiguity.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2013-07-18 13:35:19 +01:00
parent ca319873bf
commit 063645118c
4 changed files with 16 additions and 17 deletions

View File

@@ -58,7 +58,7 @@ static int guestinfo_fetch_type ( struct settings *settings,
strlen ( parent_name ) + 1 /* "." */ +
strlen ( setting->name ) + 1 /* "." */ +
( type ? strlen ( type->name ) : 0 ) + 1 /* NUL */ ];
struct setting *named_setting;
struct setting *predefined;
char *info;
int info_len;
int check_len;
@@ -82,9 +82,8 @@ static int guestinfo_fetch_type ( struct settings *settings,
/* Determine default type if necessary */
if ( ! type ) {
named_setting = find_setting ( setting->name );
type = ( named_setting ?
named_setting->type : &setting_type_string );
predefined = find_setting ( setting->name );
type = ( predefined ? predefined->type : &setting_type_string );
}
assert ( type != NULL );