/** @file\r
- Implementation of reading and writing operations on the NVRAM device\r
- attached to a network interface.\r
+ Implementation of reading and writing operations on the NVRAM device\r
+ attached to a network interface.\r
\r
-Copyright (c) 2004 - 2007, Intel Corporation. <BR> \r
+Copyright (c) 2004 - 2009, Intel Corporation. <BR> \r
All rights reserved. This program and the accompanying materials are licensed \r
and made available under the terms and conditions of the BSD License which \r
accompanies this distribution. The full text of the license may be found at \r
//\r
// Issue UNDI command and check result.\r
//\r
- DEBUG ((EFI_D_INFO | EFI_D_NET, "\nsnp->undi.nvdata () "));\r
+ DEBUG ((EFI_D_NET, "\nsnp->undi.nvdata () "));\r
\r
(*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);\r
\r
\r
case PXE_STATCODE_UNSUPPORTED:\r
DEBUG (\r
- (EFI_D_ERROR | EFI_D_NET,\r
+ (EFI_D_NET,\r
"\nsnp->undi.nvdata() %xh:%xh\n",\r
Snp->Cdb.StatFlags,\r
Snp->Cdb.StatCode)\r
\r
default:\r
DEBUG (\r
- (EFI_D_ERROR | EFI_D_NET,\r
+ (EFI_D_NET,\r
"\nsnp->undi.nvdata() %xh:%xh\n",\r
Snp->Cdb.StatFlags,\r
Snp->Cdb.StatCode)\r
return EFI_DEVICE_ERROR;\r
}\r
\r
- CopyMem (Buffer, Db->Data.Byte + Offset, BufferSize);\r
+ ASSERT (Offset < sizeof (Db->Data));\r
+\r
+ CopyMem (Buffer, &Db->Data.Byte[Offset], BufferSize);\r
\r
return EFI_SUCCESS;\r
}\r