]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/GenBootSector: Fix parameter format mismatch in printf functions
authorHao Wu <hao.a.wu@intel.com>
Mon, 10 Oct 2016 01:35:05 +0000 (09:35 +0800)
committerHao Wu <hao.a.wu@intel.com>
Tue, 8 Nov 2016 08:36:45 +0000 (16:36 +0800)
The return value of GetLastError() API is 32-bit unsigned integer, change
the relating format specification from '%x' to '%lx' to keep them matched.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/C/GenBootSector/GenBootSector.c

index c218548a4c4943bf0df09a3312345692a858e6e9..213e1b9722ffc5379d36082ff1ac12b7bfeeef22 100644 (file)
@@ -4,7 +4,7 @@ Reading/writing MBR/DBR.
     If we write MBR to disk, we just update the MBR code and the partition table wouldn't be over written.\r
     If we process DBR, we will patch MBR to set first partition active if no active partition exists.\r
     \r
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -167,7 +167,7 @@ Return:
   if (VolumeHandle == INVALID_HANDLE_VALUE) {\r
     fprintf (\r
       stderr, \r
-      "error E0005: CreateFile failed: Volume = %s, LastError = 0x%x\n", \r
+      "error E0005: CreateFile failed: Volume = %s, LastError = 0x%lx\n", \r
       VolumeAccessPath, \r
       GetLastError ()\r
       );\r
@@ -599,7 +599,7 @@ GetPathInfo (
     }\r
 \r
     if (!GetDriveInfo(VolumeLetter, &DriveInfo)) {\r
-      fprintf (stderr, "ERROR: GetDriveInfo - 0x%x\n", GetLastError ());\r
+      fprintf (stderr, "ERROR: GetDriveInfo - 0x%lx\n", GetLastError ());\r
       return ErrorPath;\r
     }\r
 \r
@@ -787,7 +787,7 @@ main (
   } else {\r
     fprintf (\r
       stderr, \r
-      "%s: %s %s: failed - %s (LastError: 0x%x)!\n",\r
+      "%s: %s %s: failed - %s (LastError: 0x%lx)!\n",\r
       (Status == ErrorNoMbr) ? "WARNING" : "ERROR",\r
       (OutputPathInfo.Type != PathFile) ? "Write" : "Read", \r
       ProcessMbr ? "MBR" : "DBR", \r