]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/BootSectImage/bootsectimage.c
Sync basetools' source and binary files with r1707 of the basetools project.
[mirror_edk2.git] / BaseTools / Source / C / BootSectImage / bootsectimage.c
index 10a545292b46b56550d3117cc338b0ed9f9c7d38..d8dc8907a5efb7f700c76281c4f87239bd5a81f3 100644 (file)
@@ -371,13 +371,13 @@ Return:
   if ((FatType == FatTypeFat32) &&\r
       (FatBpb->Fat12_16.BPB_TotSec32 == 0)) {\r
     DebugMsg (NULL, 0, DEBUG_ERROR, NULL, "ERROR: E3003: FAT32 - BPB_TotSec32 - %04x, expected: Non-Zero",\r
-        FatBpb->Fat12_16.BPB_TotSec32);\r
+        (unsigned) FatBpb->Fat12_16.BPB_TotSec32);\r
     return FatTypeUnknown;\r
   }\r
   if ((FatType == FatTypeFat32) &&\r
       (FatBpb->Fat32.BPB_FATSz32 == 0)) {\r
     DebugMsg (NULL, 0, DEBUG_ERROR, NULL, "ERROR: E3003: FAT32 - BPB_FATSz32 - %08x, expected: Non-Zero",\r
-        FatBpb->Fat32.BPB_FATSz32);\r
+        (unsigned) FatBpb->Fat32.BPB_FATSz32);\r
     return FatTypeUnknown;\r
   }\r
   if ((FatType == FatTypeFat32) &&\r
@@ -388,7 +388,7 @@ Return:
   if ((FatType == FatTypeFat32) &&\r
       (FatBpb->Fat32.BPB_RootClus != 2)) {\r
     DebugMsg (NULL, 0, DEBUG_WARN, NULL, "ERROR: E3003: FAT32 - BPB_RootClus - %08x, expected: %04x",\r
-        FatBpb->Fat32.BPB_RootClus, 2);\r
+        (unsigned) FatBpb->Fat32.BPB_RootClus, 2);\r
   }\r
   if ((FatType == FatTypeFat32) &&\r
       (FatBpb->Fat32.BPB_FSInfo != 1)) {\r
@@ -523,14 +523,14 @@ ParseBootSector (
   printf ("  16     Sectors per FAT (small vol.) %04x\n", FatBpb.Fat12_16.BPB_FATSz16);\r
   printf ("  18     Sectors per track            %04x\n", FatBpb.Fat12_16.BPB_SecPerTrk);\r
   printf ("  1A     Heads                        %04x\n", FatBpb.Fat12_16.BPB_NumHeads);\r
-  printf ("  1C     Hidden sectors               %08x\n", FatBpb.Fat12_16.BPB_HiddSec);\r
-  printf ("  20     Sectors (over 32MB)          %08x\n", FatBpb.Fat12_16.BPB_TotSec32);\r
+  printf ("  1C     Hidden sectors               %08x\n", (unsigned) FatBpb.Fat12_16.BPB_HiddSec);\r
+  printf ("  20     Sectors (over 32MB)          %08x\n", (unsigned) FatBpb.Fat12_16.BPB_TotSec32);\r
   printf ("\n");\r
   if (FatType != FatTypeFat32) {\r
     printf ("  24     BIOS drive                   %02x\n", FatBpb.Fat12_16.BS_DrvNum);\r
     printf ("  25     (Unused)                     %02x\n", FatBpb.Fat12_16.BS_Reserved1);\r
     printf ("  26     Ext. boot signature          %02x\n", FatBpb.Fat12_16.BS_BootSig);\r
-    printf ("  27     Volume serial number         %08x\n", FatBpb.Fat12_16.BS_VolID);\r
+    printf ("  27     Volume serial number         %08x\n", (unsigned) FatBpb.Fat12_16.BS_VolID);\r
     printf ("  2B     Volume lable                 %c%c%c%c%c%c%c%c%c%c%c\n",\r
                                                    FatBpb.Fat12_16.BS_VolLab[0],\r
                                                    FatBpb.Fat12_16.BS_VolLab[1],\r
@@ -555,10 +555,10 @@ ParseBootSector (
     printf ("\n");\r
   } else {\r
     printf ("FAT32 Section\n");\r
-    printf ("  24     Sectors per FAT (large vol.) %08x\n", FatBpb.Fat32.BPB_FATSz32);\r
+    printf ("  24     Sectors per FAT (large vol.) %08x\n", (unsigned) FatBpb.Fat32.BPB_FATSz32);\r
     printf ("  28     Flags                        %04x\n", FatBpb.Fat32.BPB_ExtFlags);\r
     printf ("  2A     Version                      %04x\n", FatBpb.Fat32.BPB_FSVer);\r
-    printf ("  2C     Root dir 1st cluster         %08x\n", FatBpb.Fat32.BPB_RootClus);\r
+    printf ("  2C     Root dir 1st cluster         %08x\n", (unsigned) FatBpb.Fat32.BPB_RootClus);\r
     printf ("  30     FSInfo sector                %04x\n", FatBpb.Fat32.BPB_FSInfo);\r
     printf ("  32     Backup boot sector           %04x\n", FatBpb.Fat32.BPB_BkBootSec);\r
     printf ("  34     (Reserved)                   %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n",\r
@@ -578,7 +578,7 @@ ParseBootSector (
     printf ("  40     BIOS drive                   %02x\n", FatBpb.Fat32.BS_DrvNum);\r
     printf ("  41     (Unused)                     %02x\n", FatBpb.Fat32.BS_Reserved1);\r
     printf ("  42     Ext. boot signature          %02x\n", FatBpb.Fat32.BS_BootSig);\r
-    printf ("  43     Volume serial number         %08x\n", FatBpb.Fat32.BS_VolID);\r
+    printf ("  43     Volume serial number         %08x\n", (unsigned) FatBpb.Fat32.BS_VolID);\r
     printf ("  47     Volume lable                 %c%c%c%c%c%c%c%c%c%c%c\n",\r
                                                    FatBpb.Fat32.BS_VolLab[0],\r
                                                    FatBpb.Fat32.BS_VolLab[1],\r
@@ -738,7 +738,7 @@ ParseMbr (
   printf ("  Offset Title                        Value\n");\r
   printf ("==================================================================\n");\r
   printf ("  0      Master bootstrap loader code (not list)\n");\r
-  printf ("  1B8    Windows disk signature       %08x\n", Mbr.UniqueMbrSignature);\r
+  printf ("  1B8    Windows disk signature       %08x\n", (unsigned) Mbr.UniqueMbrSignature);\r
   printf ("\n");\r
   printf ("Partition Table Entry #1\n");\r
   printf ("  1BE    80 = active partition        %02x\n", Mbr.PartitionRecord[0].BootIndicator);\r
@@ -749,8 +749,8 @@ ParseMbr (
   printf ("  1C3    End head                     %02x\n", Mbr.PartitionRecord[0].EndHead);\r
   printf ("  1C4    End sector                   %02x\n", Mbr.PartitionRecord[0].EndSector);\r
   printf ("  1C5    End cylinder                 %02x\n", Mbr.PartitionRecord[0].EndTrack);\r
-  printf ("  1C6    Sectors preceding partition  %08x\n", Mbr.PartitionRecord[0].StartingLBA);\r
-  printf ("  1CA    Sectors in partition         %08x\n", Mbr.PartitionRecord[0].SizeInLBA);\r
+  printf ("  1C6    Sectors preceding partition  %08x\n", (unsigned) Mbr.PartitionRecord[0].StartingLBA);\r
+  printf ("  1CA    Sectors in partition         %08x\n", (unsigned) Mbr.PartitionRecord[0].SizeInLBA);\r
   printf ("\n");\r
   printf ("Partition Table Entry #2\n");\r
   printf ("  1CE    80 = active partition        %02x\n", Mbr.PartitionRecord[1].BootIndicator);\r
@@ -761,8 +761,8 @@ ParseMbr (
   printf ("  1D3    End head                     %02x\n", Mbr.PartitionRecord[1].EndHead);\r
   printf ("  1D4    End sector                   %02x\n", Mbr.PartitionRecord[1].EndSector);\r
   printf ("  1D5    End cylinder                 %02x\n", Mbr.PartitionRecord[1].EndTrack);\r
-  printf ("  1D6    Sectors preceding partition  %08x\n", Mbr.PartitionRecord[1].StartingLBA);\r
-  printf ("  1DA    Sectors in partition         %08x\n", Mbr.PartitionRecord[1].SizeInLBA);\r
+  printf ("  1D6    Sectors preceding partition  %08x\n", (unsigned) Mbr.PartitionRecord[1].StartingLBA);\r
+  printf ("  1DA    Sectors in partition         %08x\n", (unsigned) Mbr.PartitionRecord[1].SizeInLBA);\r
   printf ("\n");\r
   printf ("Partition Table Entry #3\n");\r
   printf ("  1DE    80 = active partition        %02x\n", Mbr.PartitionRecord[2].BootIndicator);\r
@@ -773,8 +773,8 @@ ParseMbr (
   printf ("  1E3    End head                     %02x\n", Mbr.PartitionRecord[2].EndHead);\r
   printf ("  1E4    End sector                   %02x\n", Mbr.PartitionRecord[2].EndSector);\r
   printf ("  1E5    End cylinder                 %02x\n", Mbr.PartitionRecord[2].EndTrack);\r
-  printf ("  1E6    Sectors preceding partition  %08x\n", Mbr.PartitionRecord[2].StartingLBA);\r
-  printf ("  1EA    Sectors in partition         %08x\n", Mbr.PartitionRecord[2].SizeInLBA);\r
+  printf ("  1E6    Sectors preceding partition  %08x\n", (unsigned) Mbr.PartitionRecord[2].StartingLBA);\r
+  printf ("  1EA    Sectors in partition         %08x\n", (unsigned) Mbr.PartitionRecord[2].SizeInLBA);\r
   printf ("\n");\r
   printf ("Partition Table Entry #4\n");\r
   printf ("  1EE    80 = active partition        %02x\n", Mbr.PartitionRecord[3].BootIndicator);\r
@@ -785,8 +785,8 @@ ParseMbr (
   printf ("  1F3    End head                     %02x\n", Mbr.PartitionRecord[3].EndHead);\r
   printf ("  1F4    End sector                   %02x\n", Mbr.PartitionRecord[3].EndSector);\r
   printf ("  1F5    End cylinder                 %02x\n", Mbr.PartitionRecord[3].EndTrack);\r
-  printf ("  1F6    Sectors preceding partition  %08x\n", Mbr.PartitionRecord[3].StartingLBA);\r
-  printf ("  1FA    Sectors in partition         %08x\n", Mbr.PartitionRecord[3].SizeInLBA);\r
+  printf ("  1F6    Sectors preceding partition  %08x\n", (unsigned) Mbr.PartitionRecord[3].StartingLBA);\r
+  printf ("  1FA    Sectors in partition         %08x\n", (unsigned) Mbr.PartitionRecord[3].SizeInLBA);\r
   printf ("\n");\r
   printf ("  1FE    Signature                    %04x\n", Mbr.Signature);\r
   printf ("\n");\r