summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2015-03-18 00:45:50 +0000
committerhwu1225 <hwu1225@Edk2>2015-03-18 00:45:50 +0000
commit9439da565e280199469f82db159ea1616a715a25 (patch)
tree5522f78a94d1d07e315dd8d6f0f7dcef05c101a8 /IntelFrameworkModulePkg
parentec8a502e66fe190a77546e82820e921cfa9d05e0 (diff)
IntelFrameworkModulePkg: Remove a duplicated hardcode string
Removed a hardcode UNICODE string in IsaSerialDxe. 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> Reviewed-by: Michael Kinney <Michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17061 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg')
-rw-r--r--IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/ComponentName.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/ComponentName.c b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/ComponentName.c
index 9e98973c03..4b17c5423c 100644
--- a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/ComponentName.c
+++ b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/ComponentName.c
@@ -1,7 +1,7 @@
/** @file
UEFI Component Name and Name2 protocol for Isa serial driver.
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2015, 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
@@ -14,7 +14,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "Serial.h"
-#define SERIAL_PORT_NAME "ISA Serial Port # "
//
// EFI Component Name Protocol
//
@@ -45,6 +44,8 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mIsaSerialDriverNameTable
}
};
+GLOBAL_REMOVE_IF_UNREFERENCED CHAR16 mSerialPortName[] = L"ISA Serial Port # ";
+
/**
Retrieves a Unicode string that is the user readable name of the driver.
@@ -242,22 +243,19 @@ AddName (
IN EFI_ISA_IO_PROTOCOL *IsaIo
)
{
- CHAR16 SerialPortName[sizeof (SERIAL_PORT_NAME)];
-
- StrCpy (SerialPortName, L"ISA Serial Port # ");
- SerialPortName[sizeof (SERIAL_PORT_NAME) - 2] = (CHAR16) (L'0' + (UINT8) IsaIo->ResourceList->Device.UID);
+ mSerialPortName[(sizeof (mSerialPortName) / 2) - 2] = (CHAR16) (L'0' + (UINT8) IsaIo->ResourceList->Device.UID);
AddUnicodeString2 (
"eng",
gIsaSerialComponentName.SupportedLanguages,
&SerialDevice->ControllerNameTable,
- (CHAR16 *) SerialPortName,
+ mSerialPortName,
TRUE
);
AddUnicodeString2 (
"en",
gIsaSerialComponentName2.SupportedLanguages,
&SerialDevice->ControllerNameTable,
- (CHAR16 *) SerialPortName,
+ mSerialPortName,
FALSE
);