From e61d30b02a1463387aeea7f28f2ee4870b5fcc8a Mon Sep 17 00:00:00 2001 From: vanjeff Date: Thu, 12 Jul 2007 02:14:05 +0000 Subject: fixed memcpy link issue. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3203 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c | 7 ++++++- MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'MdeModulePkg/Bus') 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 -- cgit v1.2.3