summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2007-07-12 02:14:05 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2007-07-12 02:14:05 +0000
commite61d30b02a1463387aeea7f28f2ee4870b5fcc8a (patch)
treea8d9f82e132680fdcc2665249d19c481ecaedf23 /MdeModulePkg
parente10faeabb43069f0133cf58eb12da5800bcafbbf (diff)
downloadedk2-platforms-e61d30b02a1463387aeea7f28f2ee4870b5fcc8a.tar.xz
fixed memcpy link issue.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3203 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c7
-rw-r--r--MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c7
2 files changed, 12 insertions, 2 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
index fc0007dd11..95ad8701af 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
@@ -120,7 +120,12 @@ UsbCreateInterface (
UsbIf->Device = Device;
UsbIf->IfDesc = IfDesc;
UsbIf->IfSetting = IfDesc->Settings[IfDesc->ActiveIndex];
- UsbIf->UsbIo = mUsbIoProtocol;
+
+ CopyMem (
+ &(UsbIf->UsbIo),
+ &mUsbIoProtocol,
+ sizeof (EFI_USB_IO_PROTOCOL)
+ );
//
// Install protocols for USBIO and device path
diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c
index 980f8b2895..80fdf47055 100644
--- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c
+++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c
@@ -626,7 +626,12 @@ UsbBootDetectMedia (
EFI_STATUS Status;
Media = &UsbMass->BlockIoMedia;
- OldMedia = UsbMass->BlockIoMedia;
+
+ CopyMem (
+ &OldMedia,
+ &(UsbMass->BlockIoMedia),
+ sizeof (EFI_BLOCK_IO_MEDIA)
+ );
//
// First test whether the device is ready and get status