MdeModulePkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
This is an example of how a driver might export data to the HII protocol to be
|
||||
later utilized by the Setup Protocol
|
||||
|
||||
Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, 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
|
||||
@ -127,12 +127,12 @@ NotificationFunction(
|
||||
)
|
||||
{
|
||||
gBS->SignalEvent (mEvent);
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
Function to start monitoring for CTRL-C using SimpleTextInputEx.
|
||||
Function to start monitoring for CTRL-C using SimpleTextInputEx.
|
||||
|
||||
@retval EFI_SUCCESS The feature is enabled.
|
||||
@retval EFI_OUT_OF_RESOURCES There is not enough mnemory available.
|
||||
@ -175,7 +175,7 @@ InternalStartMonitor(
|
||||
if (EFI_ERROR (Status)) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
KeyData.KeyState.KeyShiftState = EFI_SHIFT_STATE_VALID|EFI_RIGHT_CONTROL_PRESSED;
|
||||
Status = SimpleEx->RegisterKeyNotify(
|
||||
SimpleEx,
|
||||
@ -191,7 +191,7 @@ InternalStartMonitor(
|
||||
}
|
||||
|
||||
/**
|
||||
Function to stop monitoring for CTRL-C using SimpleTextInputEx.
|
||||
Function to stop monitoring for CTRL-C using SimpleTextInputEx.
|
||||
|
||||
@retval EFI_SUCCESS The feature is enabled.
|
||||
@retval EFI_OUT_OF_RESOURCES There is not enough mnemory available.
|
||||
@ -205,7 +205,7 @@ InternalStopMonitor(
|
||||
EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *SimpleEx;
|
||||
EFI_STATUS Status;
|
||||
EFI_HANDLE *Handles;
|
||||
EFI_KEY_DATA KeyData;
|
||||
EFI_KEY_DATA KeyData;
|
||||
UINTN HandleCount;
|
||||
UINTN HandleIndex;
|
||||
EFI_HANDLE NotifyHandle;
|
||||
@ -344,7 +344,7 @@ GetValueOfNumber (
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
|
||||
Length = *Len;
|
||||
ZeroMem (TemStr, sizeof (TemStr));
|
||||
for (Index = 0; Index < Length; Index ++) {
|
||||
@ -369,7 +369,7 @@ Exit:
|
||||
}
|
||||
|
||||
/**
|
||||
Create altcfg string.
|
||||
Create altcfg string.
|
||||
|
||||
@param Result The request result string.
|
||||
@param ConfigHdr The request head info. <ConfigHdr> format.
|
||||
@ -379,7 +379,7 @@ Exit:
|
||||
|
||||
@retval The string with altcfg info append at the end.
|
||||
**/
|
||||
EFI_STRING
|
||||
EFI_STRING
|
||||
CreateAltCfgString (
|
||||
IN EFI_STRING Result,
|
||||
IN EFI_STRING ConfigHdr,
|
||||
@ -404,60 +404,60 @@ CreateAltCfgString (
|
||||
TmpStr = StringPtr;
|
||||
if (Result != NULL) {
|
||||
StrCpyS (StringPtr, NewLen / sizeof (CHAR16), Result);
|
||||
StringPtr += StrLen (Result);
|
||||
StringPtr += StrLen (Result);
|
||||
FreePool (Result);
|
||||
}
|
||||
|
||||
|
||||
UnicodeSPrint (
|
||||
StringPtr,
|
||||
(1 + StrLen (ConfigHdr) + 8 + 4 + 1) * sizeof (CHAR16),
|
||||
L"&%s&ALTCFG=%04x",
|
||||
ConfigHdr,
|
||||
StringPtr,
|
||||
(1 + StrLen (ConfigHdr) + 8 + 4 + 1) * sizeof (CHAR16),
|
||||
L"&%s&ALTCFG=%04x",
|
||||
ConfigHdr,
|
||||
EFI_HII_DEFAULT_CLASS_STANDARD
|
||||
);
|
||||
StringPtr += StrLen (StringPtr);
|
||||
|
||||
UnicodeSPrint (
|
||||
StringPtr,
|
||||
StringPtr,
|
||||
(8 + 4 + 7 + 4 + 7 + 4 + 1) * sizeof (CHAR16),
|
||||
L"&OFFSET=%04x&WIDTH=%04x&VALUE=%04x",
|
||||
Offset,
|
||||
L"&OFFSET=%04x&WIDTH=%04x&VALUE=%04x",
|
||||
Offset,
|
||||
Width,
|
||||
DEFAULT_CLASS_STANDARD_VALUE
|
||||
);
|
||||
StringPtr += StrLen (StringPtr);
|
||||
StringPtr += StrLen (StringPtr);
|
||||
|
||||
UnicodeSPrint (
|
||||
StringPtr,
|
||||
(1 + StrLen (ConfigHdr) + 8 + 4 + 1) * sizeof (CHAR16),
|
||||
L"&%s&ALTCFG=%04x",
|
||||
ConfigHdr,
|
||||
StringPtr,
|
||||
(1 + StrLen (ConfigHdr) + 8 + 4 + 1) * sizeof (CHAR16),
|
||||
L"&%s&ALTCFG=%04x",
|
||||
ConfigHdr,
|
||||
EFI_HII_DEFAULT_CLASS_MANUFACTURING
|
||||
);
|
||||
StringPtr += StrLen (StringPtr);
|
||||
|
||||
UnicodeSPrint (
|
||||
StringPtr,
|
||||
StringPtr,
|
||||
(8 + 4 + 7 + 4 + 7 + 4 + 1) * sizeof (CHAR16),
|
||||
L"&OFFSET=%04x&WIDTH=%04x&VALUE=%04x",
|
||||
Offset,
|
||||
L"&OFFSET=%04x&WIDTH=%04x&VALUE=%04x",
|
||||
Offset,
|
||||
Width,
|
||||
DEFAULT_CLASS_MANUFACTURING_VALUE
|
||||
);
|
||||
StringPtr += StrLen (StringPtr);
|
||||
StringPtr += StrLen (StringPtr);
|
||||
|
||||
return TmpStr;
|
||||
}
|
||||
|
||||
/**
|
||||
Check whether need to add the altcfg string. if need to add, add the altcfg
|
||||
Check whether need to add the altcfg string. if need to add, add the altcfg
|
||||
string.
|
||||
|
||||
@param RequestResult The request result string.
|
||||
@param ConfigRequestHdr The request head info. <ConfigHdr> format.
|
||||
|
||||
**/
|
||||
VOID
|
||||
VOID
|
||||
AppendAltCfgString (
|
||||
IN OUT EFI_STRING *RequestResult,
|
||||
IN EFI_STRING ConfigRequestHdr
|
||||
@ -791,7 +791,7 @@ ExtractConfig (
|
||||
Value += StrnLenS (Value, (BufferSize - ((UINTN)Value - (UINTN)*Results)) / sizeof (CHAR16));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
} else {
|
||||
//
|
||||
@ -1209,7 +1209,7 @@ DriverCallback (
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case EFI_BROWSER_ACTION_RETRIEVE:
|
||||
{
|
||||
switch (QuestionId ) {
|
||||
@ -1255,7 +1255,7 @@ DriverCallback (
|
||||
EFI_IFR_FLAG_CALLBACK, // Question flag
|
||||
0 // Action String ID
|
||||
);
|
||||
|
||||
|
||||
HiiUpdateForm (
|
||||
PrivateData->HiiHandle[0], // HII handle
|
||||
&gDriverSampleFormSetGuid, // Formset GUID
|
||||
@ -1336,7 +1336,7 @@ DriverCallback (
|
||||
break;
|
||||
|
||||
default:
|
||||
Status = EFI_UNSUPPORTED;
|
||||
Status = EFI_UNSUPPORTED;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1537,14 +1537,14 @@ DriverCallback (
|
||||
//
|
||||
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
|
||||
break;
|
||||
|
||||
|
||||
case 0x1238:
|
||||
//
|
||||
// User press "Save now", request Browser to save the uncommitted data.
|
||||
//
|
||||
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_SUBMIT;
|
||||
break;
|
||||
|
||||
|
||||
case 0x1241:
|
||||
case 0x1246:
|
||||
//
|
||||
@ -1552,21 +1552,21 @@ DriverCallback (
|
||||
//
|
||||
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT;
|
||||
break;
|
||||
|
||||
|
||||
case 0x1242:
|
||||
//
|
||||
// User press "Discard current form now", request Browser to discard the uncommitted data.
|
||||
//
|
||||
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD;
|
||||
break;
|
||||
|
||||
|
||||
case 0x1243:
|
||||
//
|
||||
// User press "Submit current form now", request Browser to save the uncommitted data.
|
||||
//
|
||||
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;
|
||||
break;
|
||||
|
||||
|
||||
case 0x1244:
|
||||
case 0x1245:
|
||||
//
|
||||
@ -1606,7 +1606,7 @@ DriverCallback (
|
||||
//
|
||||
// 2. If system support this keyword, just try to change value.
|
||||
//
|
||||
|
||||
|
||||
//
|
||||
// Change value from '0' to '1' or from '1' to '0'
|
||||
//
|
||||
@ -2114,7 +2114,7 @@ DriverSampleInit (
|
||||
FreePool (ConfigRequestHdr);
|
||||
|
||||
Status = gBS->CreateEventEx (
|
||||
EVT_NOTIFY_SIGNAL,
|
||||
EVT_NOTIFY_SIGNAL,
|
||||
TPL_NOTIFY,
|
||||
EfiEventEmptyFunction,
|
||||
NULL,
|
||||
@ -2125,7 +2125,7 @@ DriverSampleInit (
|
||||
|
||||
//
|
||||
// Example of how to use BrowserEx protocol to register HotKey.
|
||||
//
|
||||
//
|
||||
Status = gBS->LocateProtocol (&gEdkiiFormBrowserExProtocolGuid, NULL, (VOID **) &FormBrowserEx);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
//
|
||||
@ -2136,7 +2136,7 @@ DriverSampleInit (
|
||||
FormBrowserEx->RegisterHotKey (&HotKey, 0, 0, NULL);
|
||||
HotKey.ScanCode = SCAN_F10;
|
||||
FormBrowserEx->RegisterHotKey (&HotKey, 0, 0, NULL);
|
||||
|
||||
|
||||
//
|
||||
// Register the default HotKey F9 and F10 again.
|
||||
//
|
||||
|
Reference in New Issue
Block a user