Bladeren bron

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

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 8 jaren geleden
bovenliggende
commit
56c0147deb
3 gewijzigde bestanden met toevoegingen van 4 en 4 verwijderingen
  1. 1
    1
      src/core/memmap_settings.c
  2. 2
    2
      src/core/settings.c
  3. 1
    1
      src/include/ipxe/settings.h

+ 1
- 1
src/core/memmap_settings.c Bestand weergeven

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

+ 2
- 2
src/core/settings.c Bestand weergeven

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

+ 1
- 1
src/include/ipxe/settings.h Bestand weergeven

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

Laden…
Annuleren
Opslaan