From: Jiaxin Wu <jiaxin.wu@intel.com>
To: edk2-devel@lists.01.org
Cc: Eric Dong <eric.dong@intel.com>, Ye Ting <ting.ye@intel.com>,
Fu Siyuan <siyuan.fu@intel.com>, Wu Jiaxin <jiaxin.wu@intel.com>
Subject: [Patch] MdeModulePkg/DeviceManagerUiLib: Fix the network device MAC display issue
Date: Mon, 17 Apr 2017 16:07:46 +0800 [thread overview]
Message-ID: <1492416466-22044-1-git-send-email-jiaxin.wu@intel.com> (raw)
Network device tile (STR_FORM_NETWORK_DEVICE_TITLE) is dynamic adjusted
according the different MAC value. So, the string value shouldn't be treated
as a constant string (Network Device). Otherwise, the display will be
incorrect.
Reproduce: Device Manager->Network Device List, select to enter MAC, then to
press ESC back to previous page, then re-enter, found each enter/ESC operation,
the MAC address display +1.
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
---
MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c b/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c
index 5098b70..8630ab0 100644
--- a/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c
+++ b/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c
@@ -538,17 +538,15 @@ CreateDeviceManagerForm(
//
// Update the network device form titile.
//
if (NextShowFormId == NETWORK_DEVICE_FORM_ID) {
- String = HiiGetString (HiiHandle, STRING_TOKEN (STR_FORM_NETWORK_DEVICE_TITLE), NULL);
NewStringLen = StrLen(mSelectedMacAddrString) * 2;
- NewStringLen += (StrLen(String) + 2) * 2;
+ NewStringLen += (StrLen (L"Network Device") + 2) * 2;
NewStringTitle = AllocatePool (NewStringLen);
- UnicodeSPrint (NewStringTitle, NewStringLen, L"%s %s", String, mSelectedMacAddrString);
+ UnicodeSPrint (NewStringTitle, NewStringLen, L"Network Device %s", mSelectedMacAddrString);
HiiSetString (HiiHandle, STRING_TOKEN (STR_FORM_NETWORK_DEVICE_TITLE), NewStringTitle, NULL);
- FreePool (String);
FreePool (NewStringTitle);
}
//
// Allocate space for creation of UpdateData Buffer
--
1.9.5.msysgit.1
next reply other threads:[~2017-04-17 8:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-17 8:07 Jiaxin Wu [this message]
2017-04-20 8:14 ` [Patch] MdeModulePkg/DeviceManagerUiLib: Fix the network device MAC display issue Dong, Eric
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1492416466-22044-1-git-send-email-jiaxin.wu@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox