Skip to content

Commit

Permalink
[settings] Extend numerical setting tags to "unsigned long"
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed May 20, 2016
1 parent 6d2bdc4 commit 56c0147
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/core/memmap_settings.c
Expand Up @@ -145,7 +145,7 @@ static int memmap_settings_fetch ( struct settings *settings,
unsigned int i;
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_INCLUDE_START ( setting->tag ) ? "start" : "" ),
( ( MEMMAP_INCLUDE_START ( setting->tag ) &&
Expand Down
4 changes: 2 additions & 2 deletions src/core/settings.c
Expand Up @@ -1474,9 +1474,9 @@ struct setting * find_setting ( const char *name ) {
* @v name Name
* @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 );
unsigned int tag = 0;
unsigned long tag = 0;

while ( 1 ) {
tag = ( ( tag << 8 ) | strtoul ( tmp, &tmp, 0 ) );
Expand Down
2 changes: 1 addition & 1 deletion src/include/ipxe/settings.h
Expand Up @@ -40,7 +40,7 @@ struct setting {
* (such as a DHCP option number, or an SMBIOS structure and
* field number).
*/
unsigned int tag;
unsigned long tag;
/** Setting scope (or NULL)
*
* For historic reasons, a NULL scope with a non-zero tag
Expand Down

0 comments on commit 56c0147

Please sign in to comment.