[settings] Extend numerical setting tags to "unsigned long"

Signed-off-by: Michael Brown <mcb30@ipxe.org>
pull/54/head^2
Michael Brown 2016-05-20 13:05:39 +01:00
parent 6d2bdc4ea3
commit 56c0147deb
3 changed files with 4 additions and 4 deletions

View File

@ -145,7 +145,7 @@ static int memmap_settings_fetch ( struct settings *settings,
unsigned int i; unsigned int i;
unsigned int count; unsigned int count;
DBGC ( settings, "MEMMAP start %d count %d %s%s%s%s scale %d\n", DBGC ( settings, "MEMMAP start %ld count %ld %s%s%s%s scale %ld\n",
MEMMAP_START ( setting->tag ), MEMMAP_COUNT ( setting->tag ), MEMMAP_START ( setting->tag ), MEMMAP_COUNT ( setting->tag ),
( MEMMAP_INCLUDE_START ( setting->tag ) ? "start" : "" ), ( MEMMAP_INCLUDE_START ( setting->tag ) ? "start" : "" ),
( ( MEMMAP_INCLUDE_START ( setting->tag ) && ( ( MEMMAP_INCLUDE_START ( setting->tag ) &&

View File

@ -1474,9 +1474,9 @@ struct setting * find_setting ( const char *name ) {
* @v name Name * @v name Name
* @ret tag Tag number, or 0 if not a valid number * @ret tag Tag number, or 0 if not a valid number
*/ */
static unsigned int parse_setting_tag ( const char *name ) { static unsigned long parse_setting_tag ( const char *name ) {
char *tmp = ( ( char * ) name ); char *tmp = ( ( char * ) name );
unsigned int tag = 0; unsigned long tag = 0;
while ( 1 ) { while ( 1 ) {
tag = ( ( tag << 8 ) | strtoul ( tmp, &tmp, 0 ) ); tag = ( ( tag << 8 ) | strtoul ( tmp, &tmp, 0 ) );

View File

@ -40,7 +40,7 @@ struct setting {
* (such as a DHCP option number, or an SMBIOS structure and * (such as a DHCP option number, or an SMBIOS structure and
* field number). * field number).
*/ */
unsigned int tag; unsigned long tag;
/** Setting scope (or NULL) /** Setting scope (or NULL)
* *
* For historic reasons, a NULL scope with a non-zero tag * For historic reasons, a NULL scope with a non-zero tag