Three GUIDs had been retired, PrimaryConsoleInDeviceGuid, PrimaryConsoleOutDeviceGuid...
[mirror_edk2.git] / EdkShellPkg / ShellHotFix.patch
CommitLineData
0fe4decf 1Index: drivers/drivers.c\r
2===================================================================\r
3--- drivers/drivers.c (revision 30)\r
4+++ drivers/drivers.c (working copy)\r
5@@ -130,6 +130,7 @@\r
6 UINTN StringIndex;
7 UINTN Index;
8 CHAR8 *Language;
9+ CHAR8 *PlatformLanguage;
10 UINTN DriverImageHandleCount;
11 EFI_HANDLE *DriverImageHandleBuffer;
12 UINTN HandleIndex;
13@@ -152,6 +153,7 @@\r
14 SHELL_VAR_CHECK_PACKAGE ChkPck;
15
16 Language = NULL;
17+ PlatformLanguage = NULL;
18 DriverImageHandleCount = 0;
19 DriverImageHandleBuffer = NULL;
20 IsHelp = FALSE;
21@@ -241,7 +243,7 @@\r
22 goto Done;
23 }
24
25- Language = LibGetVariableLang ();
26+ Language = LibGetVariable (L"Lang", &gEfiGlobalVariableGuid);
27 if (Language == NULL) {
28 Language = (CHAR8 *)AllocateZeroPool(strlena(LanguageCodeEnglish) + 1);
29 if (Language == NULL) {
30@@ -250,6 +252,15 @@\r
31 strcpya(Language, LanguageCodeEnglish);
32 }
33
34+ PlatformLanguage = LibGetVariable (L"PlatformLang", &gEfiGlobalVariableGuid);
35+ if (PlatformLanguage == NULL) {
36+ PlatformLanguage = (CHAR8 *)AllocateZeroPool(strlena(PlatformLanguageCodeEnglish) + 1);
37+ if (PlatformLanguage == NULL) {
38+ return EFI_OUT_OF_RESOURCES;
39+ }
40+ strcpya(PlatformLanguage, PlatformLanguageCodeEnglish);
41+ }
42+
43 Item = LibCheckVarGetFlag (&ChkPck, L"-l");
44 if (Item) {
45 if (Language != NULL) {
46@@ -314,14 +325,6 @@\r
47 EFI_OPEN_PROTOCOL_GET_PROTOCOL
48 );
49
50- ComponentName = NULL;
51- ComponentName2 = NULL;
52- Status = LibGetComponentNameProtocol (
53- DriverImageHandleBuffer[Index],
54- &ComponentName,
55- &ComponentName2
56- );
57-
58 DiagnosticsStatus = BS->OpenProtocol (
59 DriverImageHandleBuffer[Index],
60 &gEfiDriverDiagnostics2ProtocolGuid,
61@@ -418,37 +421,73 @@\r
62 } else {
63 PrintToken (STRING_TOKEN (STR_SHELLENV_PROTID_ONE_VAR_D), HiiHandle, NumberOfChildren);
64 }
65-
66- Status = EFI_SUCCESS;
67+
68 DriverName = L"<UNKNOWN>";
69- SupportedLanguage = NULL;
70- if (ComponentName != NULL) {
71- if (ComponentName->GetDriverName != NULL) {
72- SupportedLanguage = LibConvertSupportedLanguage (ComponentName->SupportedLanguages, Language);
73+ Status = BS->OpenProtocol (
74+ DriverImageHandleBuffer[Index],
75+ &gEfiComponentName2ProtocolGuid,
76+ (VOID **) &ComponentName2,
77+ NULL,
78+ NULL,
79+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
80+ );
81+ if (!EFI_ERROR (Status)) {
82+ //
83+ // Driver has Component Name 2 Protocol is available, we get the
84+ // driver name var RFC 3066 language code
85+ //
86+ Status = ComponentName2->GetDriverName (
87+ ComponentName2,
88+ PlatformLanguage,
89+ &DriverName
90+ );
91+ if (EFI_ERROR (Status)) {
92+ //
93+ // Current RFC3066 language code fails, we then extract the supported
94+ // language from Component Name 2 protocol interface.
95+ //
96+ SupportedLanguage = ExtractSupportedLanguage(ComponentName2->SupportedLanguages, Language);
97+ if (SupportedLanguage != NULL) {
98+ Status = ComponentName2->GetDriverName (
99+ ComponentName2,
100+ SupportedLanguage,
101+ &DriverName
102+ );
103+ FreePool(SupportedLanguage);
104+ }
105+ }
106+ }
107+ if (EFI_ERROR (Status)) {
108+ //
109+ // In case Component Name 2 protocol is not available or some error occurs
110+ // when getting driver name from Component Name 2 protocol, we get driver
111+ // name from Component Name protocol.
112+ //
113+ Status = BS->OpenProtocol (
114+ DriverImageHandleBuffer[Index],
115+ &gEfiComponentNameProtocolGuid,
116+ (VOID **) &ComponentName,
117+ NULL,
118+ NULL,
119+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
120+ );
121+ if (!EFI_ERROR (Status)) {
122 Status = ComponentName->GetDriverName (
123 ComponentName,
124- SupportedLanguage,
125+ Language,
126 &DriverName
127 );
128 }
129- } else if (ComponentName2 != NULL) {
130- if (ComponentName2->GetDriverName != NULL) {
131- SupportedLanguage = LibConvertSupportedLanguage (ComponentName2->SupportedLanguages, Language);
132- Status = ComponentName2->GetDriverName (
133- ComponentName2,
134- SupportedLanguage,
135- &DriverName
136- );
137- }
138 }
139- if (SupportedLanguage != NULL) {
140- FreePool (SupportedLanguage);
141- }
142-
143 if (EFI_ERROR (Status)) {
144+ //
145+ // Fails to get driver name from either Component Name 2 & Component Name
146+ // Protocol, we show "<UNKNOWN>" string as driver name.
147+ //
148 DriverName = L"<UNKNOWN>";
149 }
150
151+
152 for (StringIndex = 0; StringIndex < StrLen (DriverName) && StringIndex < 35; StringIndex++) {
153 FormattedDriverName[StringIndex] = DriverName[StringIndex];
154 }
155@@ -491,6 +530,10 @@\r
156 FreePool (Language);
157 }
158
159+ if (PlatformLanguage != NULL) {
160+ FreePool (PlatformLanguage);
161+ }
162+
163 ShellCloseHandleEnumerator ();
164 LibCheckVarFreeVarList (&ChkPck);
165 LibUnInitializeStrings ();
157398c2 166Index: edit/libEditor.c\r
167===================================================================\r
168--- edit/libEditor.c (revision 30)\r
169+++ edit/libEditor.c (working copy)\r
170@@ -88,8 +88,6 @@\r
171 )\r
172 {\r
173 EFI_STATUS Status;\r
174- EFI_HANDLE *HandleBuffer;\r
175- UINTN HandleCount;\r
176 \r
177 //\r
178 // basic initialization\r
179@@ -117,38 +115,22 @@\r
180 );\r
181 \r
182 //\r
183- // Find mouse\r
184+ // Find mouse in System Table ConsoleInHandle\r
185 //\r
186- HandleBuffer = NULL;\r
187- Status = LibLocateHandle (\r
188- ByProtocol,\r
189- &gEfiPrimaryConsoleInDeviceGuid,\r
190- NULL,\r
191- &HandleCount,\r
192- &HandleBuffer\r
193- );\r
194+ Status = BS->HandleProtocol (\r
195+ In,\r
196+ &gEfiSimplePointerProtocolGuid,\r
197+ &MainEditor.MouseInterface\r
198+ );\r
199 \r
200- if (!EFI_ERROR (Status)) {\r
201- if (HandleCount > 0) {\r
202- Status = BS->HandleProtocol (\r
203- HandleBuffer[0],\r
204- &gEfiSimplePointerProtocolGuid,\r
205- &MainEditor.MouseInterface\r
206- );\r
207-\r
208- if (EFI_ERROR (Status)) {\r
209- MainEditor.MouseInterface = NULL;\r
210- } else {\r
211- MainEditor.MouseAccumulatorX = 0;\r
212- MainEditor.MouseAccumulatorY = 0;\r
213- MainEditor.MouseSupported = TRUE;\r
214- }\r
215- }\r
216+ if (EFI_ERROR (Status)) {\r
217+ MainEditor.MouseInterface = NULL;\r
218+ } else {\r
219+ MainEditor.MouseAccumulatorX = 0;\r
220+ MainEditor.MouseAccumulatorY = 0;\r
221+ MainEditor.MouseSupported = TRUE;\r
222 }\r
223 \r
224- if (HandleBuffer) {\r
225- FreePool (HandleBuffer);\r
226- }\r
227 //\r
228 // below will call the five components' init function\r
229 //\r
f8a6b282 230Index: edit/libFileBuffer.c\r
231===================================================================\r
232--- edit/libFileBuffer.c (revision 30)\r
233+++ edit/libFileBuffer.c (working copy)\r
234@@ -735,7 +735,7 @@\r
235 UINTN LineSize;
236 VOID *Buffer;
237 CHAR16 *UnicodeBuffer;
238- CHAR8 *AsciiBuffer;
239+ UINT8 *AsciiBuffer;
240 UINTN FileSize;
241 EFI_FILE_HANDLE Handle;
242 BOOLEAN CreateFile;
243@@ -1047,7 +1047,7 @@\r
244 //
245 // Unicode file
246 //
247- if (AsciiBuffer[0] == 0xff && AsciiBuffer[1] == 0xfe) {
248+ if ((FileSize >= 2) && (*((UINT16 *) Buffer) == EFI_UNICODE_BYTE_ORDER_MARK)) {
249 //
250 // Unicode file's size should be even
157398c2 251 //\r
252Index: hexedit/libEditor.c\r
253===================================================================\r
254--- hexedit/libEditor.c (revision 30)\r
255+++ hexedit/libEditor.c (working copy)\r
256@@ -100,8 +100,6 @@\r
257 --*/\r
258 {\r
259 EFI_STATUS Status;\r
260- EFI_HANDLE *HandleBuffer;\r
261- UINTN HandleCount;\r
262 \r
263 //\r
264 // basic initialization\r
265@@ -129,36 +127,19 @@\r
266 &(HMainEditor.ScreenSize.Row)\r
267 );\r
268 \r
269- HandleBuffer = NULL;\r
270- Status = LibLocateHandle (\r
271- ByProtocol,\r
272- &gEfiPrimaryConsoleInDeviceGuid,\r
273- NULL,\r
274- &HandleCount,\r
275- &HandleBuffer\r
276- );\r
277-\r
278- if (!EFI_ERROR (Status)) {\r
279-\r
280- if (HandleCount > 0) {\r
281- Status = BS->HandleProtocol (\r
282- HandleBuffer[0],\r
283- &gEfiSimplePointerProtocolGuid,\r
284- &HMainEditor.MouseInterface\r
285- );\r
286- if (EFI_ERROR (Status)) {\r
287- HMainEditor.MouseInterface = NULL;\r
288- } else {\r
289- HMainEditor.MouseAccumulatorX = 0;\r
290- HMainEditor.MouseAccumulatorY = 0;\r
291- HMainEditor.MouseSupported = TRUE;\r
292- }\r
293- }\r
294+ Status = BS->HandleProtocol (\r
295+ In,\r
296+ &gEfiSimplePointerProtocolGuid,\r
297+ &HMainEditor.MouseInterface\r
298+ );\r
299+ if (EFI_ERROR (Status)) {\r
300+ HMainEditor.MouseInterface = NULL;\r
301+ } else {\r
302+ HMainEditor.MouseAccumulatorX = 0;\r
303+ HMainEditor.MouseAccumulatorY = 0;\r
304+ HMainEditor.MouseSupported = TRUE;\r
305 }\r
306 \r
307- if (HandleBuffer != NULL) {\r
308- FreePool (HandleBuffer);\r
309- }\r
310 //\r
311 // below will call the five components' init function\r
312 //
0fe4decf 313Index: Library/EfiShellLib.h\r
314===================================================================\r
315--- Library/EfiShellLib.h (revision 30)\r
316+++ Library/EfiShellLib.h (working copy)\r
317@@ -174,22 +174,23 @@\r
318 //
319 // Environment variable name constants
320 //
321-#define VarLanguageCodes L"LangCodes"
322-#define VarLanguage L"Lang"
323-#define VarTimeout L"Timeout"
324-#define VarConsoleIn L"ConIn"
325-#define VarConsoleOut L"ConOut"
326-#define VarErrorOut L"ErrOut"
327-#define VarBootOption L"Boot%04x"
328-#define VarBootOrder L"BootOrder"
329-#define VarBootNext L"BootNext"
330-#define VarBootCurrent L"BootCurrent"
331-#define VarDriverOption L"Driver%04x"
332-#define VarDriverOrder L"DriverOrder"
333-#define VarConsoleInpDev L"ConInDev"
334-#define VarConsoleOutDev L"ConOutDev"
335-#define VarErrorOutDev L"ErrOutDev"
336-#define LanguageCodeEnglish "eng"
337+#define VarLanguageCodes L"LangCodes"
338+#define VarLanguage L"Lang"
339+#define VarTimeout L"Timeout"
340+#define VarConsoleIn L"ConIn"
341+#define VarConsoleOut L"ConOut"
342+#define VarErrorOut L"ErrOut"
343+#define VarBootOption L"Boot%04x"
344+#define VarBootOrder L"BootOrder"
345+#define VarBootNext L"BootNext"
346+#define VarBootCurrent L"BootCurrent"
347+#define VarDriverOption L"Driver%04x"
348+#define VarDriverOrder L"DriverOrder"
349+#define VarConsoleInpDev L"ConInDev"
350+#define VarConsoleOutDev L"ConOutDev"
351+#define VarErrorOutDev L"ErrOutDev"
352+#define LanguageCodeEnglish "eng"
353+#define PlatformLanguageCodeEnglish "en-US"
354
355 #define ISO_639_2_ENTRY_SIZE 3
356 #define RFC_3066_ENTRY_SIZE 12
357@@ -333,4 +334,10 @@\r
358 IN CHAR8 *LangCode
359 );
360
361+CHAR8 *
362+ExtractSupportedLanguage (
363+ IN CONST CHAR8 *SupportedLanguages,
364+ IN CONST CHAR8 *Language
365+ );
366+
367 #endif
368Index: Library/Misc.c\r
369===================================================================\r
370--- Library/Misc.c (revision 30)\r
371+++ Library/Misc.c (working copy)\r
372@@ -1905,13 +1905,13 @@\r
373 IN VOID *UserData
374 )
375 {
376- CHAR8 *Data;
377+ UINT8 *Data;
378
379 CHAR8 Val[50];
380
381 CHAR8 Str[20];
382
383- CHAR8 c;
384+ UINT8 c;
385 UINTN Size;
386 UINTN Index;
387
388@@ -2271,3 +2271,76 @@\r
389 }
390 return Lang;
391 }
392+
393+CHAR8 *
394+ExtractSupportedLanguage (
395+ IN CONST CHAR8 *SupportedLanguages,
396+ IN CONST CHAR8 *Language
397+ )
398+/*++
399+
400+ Routine Description:
401+
402+ This function matches the major language code (first two characters) in the
403+ SupportedLanguages. The first language code in the SupportedLanguages that
404+ matches first two characters of the input Language is returned. If there is no
405+ such match, then NULL is returned.
406+
407+ Arguments:
408+
409+ SupportedLanguages - A Null-terminated ASCII string that contains one
410+ or more supported language codes.
411+
412+ LangCode - A pointer to a Null-terminated ASCII string
413+ array indicating the RFC 3066 language.
414+
415+ Returns:
416+
417+ The RFC3066 language code that matches the major language.
418+
419+--*/
420+{
421+ CONST CHAR8 *CurrentLanguage;
422+ CHAR8 *SupportedLanguage;
423+ UINTN LanguageLen;
424+
425+ CurrentLanguage = SupportedLanguages;
426+
427+ while (CurrentLanguage != '\0') {
428+ //
429+ // Search till the end of current language.
430+ //
431+ LanguageLen = 0;
432+ while (CurrentLanguage[LanguageLen] != ';' && CurrentLanguage[LanguageLen] != '\0') {
433+ LanguageLen++;
434+ }
435+
436+ //
437+ // should use AsciiStrnCmp(CurrentLanguage, Language, 2) == 0
438+ //
439+ if ((CurrentLanguage[0] == Language[0]) && (CurrentLanguage[1] == Language[1])) {
440+ //
441+ // Match the major language code, then return a new copy of
442+ // NULL-terminated SupportedLanguage.
443+ //
444+ SupportedLanguage = AllocatePool (LanguageLen + 1);
445+ CopyMem (SupportedLanguage, (VOID *) CurrentLanguage, LanguageLen);
446+
447+ SupportedLanguage[LanguageLen] = '\0';
448+
449+ return SupportedLanguage;
450+ }
451+ //
452+ // Make CurrentLangue point to the next candiate language code.
453+ //
454+ CurrentLanguage += LanguageLen;
455+ if (*CurrentLanguage == ';') {
456+ CurrentLanguage++;
457+ }
458+ }
459+
460+ return NULL;
461+}
462+
463+
464+
f8a6b282 465Index: shellenv/batch.c\r
466===================================================================\r
467--- shellenv/batch.c (revision 30)\r
468+++ shellenv/batch.c (working copy)\r
469@@ -2074,17 +2074,17 @@\r
470 --*/
471 {
472 //
473- // UNICODE byte-order-mark is two bytes
474+ // UNICODE byte-order-mark is 16 bits
475 //
476- CHAR8 Buffer8[2];
477+ UINT16 Uint16;
478 UINTN BufSize;
479 EFI_STATUS Status;
480
481 //
482 // Read the first two bytes to check for byte order mark
483 //
484- BufSize = sizeof (Buffer8);
485- Status = File->Read (File, &BufSize, Buffer8);
486+ BufSize = sizeof (Uint16);
487+ Status = File->Read (File, &BufSize, &Uint16);
488 if (EFI_ERROR (Status)) {
489 return Status;
490 }
491@@ -2098,9 +2098,8 @@\r
492 // otherwise assume it is ASCII. UNICODE byte order mark on
493 // IA little endian is first byte 0xff and second byte 0xfe
494 //
495- if ((Buffer8[0] | (Buffer8[1] << 8)) == EFI_UNICODE_BYTE_ORDER_MARK) {
496+ if ((BufSize == 2) && (Uint16 == EFI_UNICODE_BYTE_ORDER_MARK)) {
497 *IsAscii = FALSE;
498-
499 } else {
500 *IsAscii = TRUE;
501 }
157398c2 502Index: shellenv/Connect.c\r
503===================================================================\r
504--- shellenv/Connect.c (revision 30)\r
505+++ shellenv/Connect.c (working copy)\r
506@@ -831,6 +831,16 @@\r
507 return Status;\r
508 }\r
509 \r
510+ //\r
511+ // Close proxy console before disconnect all devices.\r
512+ //\r
513+ SEnvCloseConsoleProxy (\r
514+ ST->ConsoleInHandle,\r
515+ &ST->ConIn,\r
516+ ST->ConsoleOutHandle,\r
517+ &ST->ConOut\r
518+ );\r
519+\r
520 for (Index = 0; Index < AllHandleCount; Index++) {\r
521 //\r
522 // Check whether the handle is still in handle database\r
523@@ -1004,7 +1014,6 @@\r
524 VOID\r
525 SEnvConnectConsole (\r
526 CHAR16 *VariableName,\r
527- EFI_GUID *PrimaryGuid,\r
528 EFI_GUID *ConsoleGuid,\r
529 EFI_HANDLE *ConsoleHandle,\r
530 VOID **ConsoleInterface\r
531@@ -1018,9 +1027,8 @@\r
532 EFI_HANDLE *AllHandleBuffer;\r
533 VOID *Interface;\r
534 \r
535- *ConsoleHandle = NULL;\r
536- *ConsoleInterface = NULL;\r
537 ConsoleIndex = 0;\r
538+ AllHandleBuffer = NULL;\r
539 \r
540 DevicePath = LibGetVariable (VariableName, &gEfiGlobalVariableGuid);\r
541 if (DevicePath != NULL) {\r
542@@ -1028,17 +1036,19 @@\r
543 FreePool (DevicePath);\r
544 }\r
545 \r
546- AllHandleBuffer = NULL;\r
547- Status = BS->LocateHandleBuffer (\r
548- ByProtocol,\r
549- PrimaryGuid,\r
550- NULL,\r
551- &AllHandleCount,\r
552- &AllHandleBuffer\r
553- );\r
554- if (!EFI_ERROR (Status) && AllHandleCount > 0) {\r
555- *ConsoleHandle = AllHandleBuffer[0];\r
556- } else if (*ConsoleHandle == NULL) {\r
557+ Status = EFI_NOT_FOUND;\r
558+ //\r
559+ // Check ConsoleHandle validation whatever it was updated or not.\r
560+ //\r
561+ if (*ConsoleHandle != NULL) {\r
562+ Status = BS->HandleProtocol (\r
563+ *ConsoleHandle,\r
564+ ConsoleGuid,\r
565+ &Interface\r
566+ );\r
567+ }\r
568+\r
569+ if (EFI_ERROR (Status)) {\r
570 AllHandleBuffer = NULL;\r
571 Status = BS->LocateHandleBuffer (\r
572 ByProtocol,\r
573@@ -1063,16 +1073,16 @@\r
574 &gEfiDevicePathProtocolGuid,\r
575 &Interface\r
576 );\r
577- if (EFI_ERROR (Status)) {\r
578+ if (!EFI_ERROR (Status)) {\r
579 ConsoleIndex = Index;\r
580 break;\r
581 }\r
582 }\r
583+ \r
584+ *ConsoleHandle = AllHandleBuffer[ConsoleIndex];\r
585 }\r
586 }\r
587 \r
588- *ConsoleHandle = AllHandleBuffer[ConsoleIndex];\r
589-\r
590 if (*ConsoleHandle != NULL) {\r
591 BS->HandleProtocol (\r
592 *ConsoleHandle,\r
593@@ -1081,7 +1091,7 @@\r
594 );\r
595 }\r
596 \r
597- if (AllHandleBuffer) {\r
598+ if (AllHandleBuffer != NULL) {\r
599 FreePool (AllHandleBuffer);\r
600 }\r
601 }\r
602@@ -1189,8 +1199,7 @@\r
603 EFI_STATUS Status;\r
604 \r
605 //\r
606- // Check current ConIn and ConOut to ensure it is the ConsoleProxy\r
607- // Otherwise, the Console should not be close\r
608+ // Check current ConIn and ConOut to judge it is the ConsoleProxy\r
609 //\r
610 Status = SEnvCheckConsoleProxy (\r
611 ST->ConsoleInHandle,\r
612@@ -1203,23 +1212,21 @@\r
613 // Indicate the Console is replaced by redirection operation\r
614 // It is not safe to connect Console here\r
615 //\r
616- if (EFI_ERROR (Status)) {\r
617- return ;\r
618+ if (!EFI_ERROR (Status)) {\r
619+ //\r
620+ // It is proxy console, to prevent the proxy console form being restored to original console,\r
621+ // close it temporary before connect all console\r
622+ //\r
623+ SEnvCloseConsoleProxy (\r
624+ ST->ConsoleInHandle,\r
625+ &ST->ConIn,\r
626+ ST->ConsoleOutHandle,\r
627+ &ST->ConOut\r
628+ );\r
629 }\r
630- //\r
631- // To prevent the proxy console form being restored to original console,\r
632- // close it temporary before connect all console\r
633- //\r
634- SEnvCloseConsoleProxy (\r
635- ST->ConsoleInHandle,\r
636- &ST->ConIn,\r
637- ST->ConsoleOutHandle,\r
638- &ST->ConOut\r
639- );\r
640 \r
641 SEnvConnectConsole (\r
642 VarErrorOut,\r
643- &gEfiPrimaryStandardErrorDeviceGuid,\r
644 &gEfiSimpleTextOutProtocolGuid,\r
645 &ST->StandardErrorHandle,\r
646 (VOID **) &ST->StdErr\r
647@@ -1227,7 +1234,6 @@\r
648 \r
649 SEnvConnectConsole (\r
650 VarConsoleOut,\r
651- &gEfiPrimaryConsoleOutDeviceGuid,\r
652 &gEfiSimpleTextOutProtocolGuid,\r
653 &ST->ConsoleOutHandle,\r
654 (VOID **) &ST->ConOut\r
655@@ -1235,7 +1241,6 @@\r
656 \r
657 SEnvConnectConsole (\r
658 VarConsoleIn,\r
659- &gEfiPrimaryConsoleInDeviceGuid,\r
660 &gEfiSimpleTextInProtocolGuid,\r
661 &ST->ConsoleInHandle,\r
662 (VOID **) &ST->ConIn\r
663@@ -1254,6 +1259,8 @@\r
664 SetCrc (&ST->Hdr);\r
665 }\r
666 \r
667+\r
668+\r
669 EFI_STATUS\r
670 EFIAPI\r
671 SEnvCmdReconnect (\r
0fe4decf 672Index: SmbiosView/PrintInfo.c\r
673===================================================================\r
674--- SmbiosView/PrintInfo.c (revision 30)\r
675+++ SmbiosView/PrintInfo.c (working copy)\r
676@@ -1779,7 +1779,7 @@\r
677 //
678 // MaxSize is determined by follow formula
679 //
680- MaxSize = 1 << Size;
681+ MaxSize = (UINTN) 1 << Size;
682 PrintToken (STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_ONE_VAR_MB), HiiHandle, MaxSize);
683
684 if (Option >= SHOW_DETAIL) {
685Index: SmbiosView/Smbios.h\r
686===================================================================\r
687--- SmbiosView/Smbios.h (revision 30)\r
688+++ SmbiosView/Smbios.h (working copy)\r
689@@ -34,11 +34,6 @@\r
690
691 extern EFI_HII_HANDLE HiiHandle;
692
693-#define EFI_SMBIOS_TABLE_GUID \
694- { \
695- 0xeb9d2d31, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
696- }
697
698-extern EFI_GUID gEfiSmbiosTableGuid;
699
700 #endif