diff options
author | Hao Wu <hao.a.wu@intel.com> | 2016-10-10 09:35:05 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2016-11-08 16:36:45 +0800 |
commit | f8708503cf354afcbb989583746f1e331014c059 (patch) | |
tree | 4fd2dd506ac28151c3c6dcb18da623ae9f5f7a81 /BaseTools/Source | |
parent | 61eb9834a30299f506e61deef6337dc77c726517 (diff) | |
download | edk2-platforms-f8708503cf354afcbb989583746f1e331014c059.tar.xz |
BaseTools/GenBootSector: Fix parameter format mismatch in printf functions
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>
Diffstat (limited to 'BaseTools/Source')
-rw-r--r-- | BaseTools/Source/C/GenBootSector/GenBootSector.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/BaseTools/Source/C/GenBootSector/GenBootSector.c b/BaseTools/Source/C/GenBootSector/GenBootSector.c index c218548a4c..213e1b9722 100644 --- a/BaseTools/Source/C/GenBootSector/GenBootSector.c +++ b/BaseTools/Source/C/GenBootSector/GenBootSector.c @@ -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.
If we process DBR, we will patch MBR to set first partition active if no active partition exists.
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -167,7 +167,7 @@ Return: if (VolumeHandle == INVALID_HANDLE_VALUE) {
fprintf (
stderr,
- "error E0005: CreateFile failed: Volume = %s, LastError = 0x%x\n",
+ "error E0005: CreateFile failed: Volume = %s, LastError = 0x%lx\n",
VolumeAccessPath,
GetLastError ()
);
@@ -599,7 +599,7 @@ GetPathInfo ( }
if (!GetDriveInfo(VolumeLetter, &DriveInfo)) {
- fprintf (stderr, "ERROR: GetDriveInfo - 0x%x\n", GetLastError ());
+ fprintf (stderr, "ERROR: GetDriveInfo - 0x%lx\n", GetLastError ());
return ErrorPath;
}
@@ -787,7 +787,7 @@ main ( } else {
fprintf (
stderr,
- "%s: %s %s: failed - %s (LastError: 0x%x)!\n",
+ "%s: %s %s: failed - %s (LastError: 0x%lx)!\n",
(Status == ErrorNoMbr) ? "WARNING" : "ERROR",
(OutputPathInfo.Type != PathFile) ? "Write" : "Read",
ProcessMbr ? "MBR" : "DBR",
|