diff options
author | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-01-25 11:50:59 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-01-25 11:50:59 +0000 |
commit | 9127a094fd2214da6af972a1e322a04b9e16222d (patch) | |
tree | 4a5a32539da5fe222eb38bf71d1d8bf736ada37f /ArmPlatformPkg/Bds/BootOption.c | |
parent | 1ea3171660e62b5c5b18cae2c1a8a44d71f47b0b (diff) | |
download | edk2-platforms-9127a094fd2214da6af972a1e322a04b9e16222d.tar.xz |
ArmPlatformPkg/Bds: Fixed the deletion of boot option entries
When deleting a boot entry from the boot menu all next entries must
be copied one entry up to rearrange the BootOrder list.
This patch fixes the copy: each boot entry is 16 bits, not 8 bits.
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14090 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/Bds/BootOption.c')
-rw-r--r-- | ArmPlatformPkg/Bds/BootOption.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ArmPlatformPkg/Bds/BootOption.c b/ArmPlatformPkg/Bds/BootOption.c index 289d36a50b..e562add3d1 100644 --- a/ArmPlatformPkg/Bds/BootOption.c +++ b/ArmPlatformPkg/Bds/BootOption.c @@ -1,6 +1,6 @@ /** @file
*
-* Copyright (c) 2011-2012, ARM Limited. All rights reserved.
+* Copyright (c) 2011-2013, ARM Limited. All rights reserved.
*
* This program and the accompanying materials
* are licensed and made available under the terms and conditions of the BSD License
@@ -367,7 +367,11 @@ BootOptionDelete ( if (BootOrder[Index] == BootOption->LoadOptionIndex) {
// If it the last entry we do not need to rearrange the BootOrder list
if (Index + 1 != BootOrderCount) {
- CopyMem (&BootOrder[Index],&BootOrder[Index+1], BootOrderCount - (Index + 1));
+ CopyMem (
+ &BootOrder[Index],
+ &BootOrder[Index + 1],
+ (BootOrderCount - (Index + 1)) * sizeof(UINT16)
+ );
}
break;
}
|