summaryrefslogtreecommitdiffstats
path: root/ShellPkg/DynamicCommand
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2018-06-27 21:13:38 +0800
committerLiming Gao <liming.gao@intel.com>2018-06-28 11:19:51 +0800
commitba0014b9f8ae1a593f03e744f26008214c2b06a8 (patch)
treed40c0369fe53be8bd4a8c5595b773ec1bf3cf884 /ShellPkg/DynamicCommand
parent24bfed691d9b581830933623204b56a704d1abd2 (diff)
downloadedk2-ba0014b9f8ae1a593f03e744f26008214c2b06a8.tar.gz
edk2-ba0014b9f8ae1a593f03e744f26008214c2b06a8.tar.bz2
edk2-ba0014b9f8ae1a593f03e744f26008214c2b06a8.zip
ShellPkg: 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: Ruiyu Ni <ruiyu.ni@intel.com>
Diffstat (limited to 'ShellPkg/DynamicCommand')
-rw-r--r--ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c10
-rw-r--r--ShellPkg/DynamicCommand/DpDynamicCommand/Dp.uni4
-rw-r--r--ShellPkg/DynamicCommand/DpDynamicCommand/DpInternal.h110
-rw-r--r--ShellPkg/DynamicCommand/DpDynamicCommand/DpUtilities.c48
-rw-r--r--ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.c34
5 files changed, 103 insertions, 103 deletions
diff --git a/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c b/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c
index 925341303a..a906808ab3 100644
--- a/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c
+++ b/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c
@@ -12,14 +12,14 @@
and start and end time values.
Dp uses this information to group records in different ways. It also uses
timer information to calculate elapsed time for each measurement.
-
+
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<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
http://opensource.org/licenses/bsd-license.php
-
+
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -741,10 +741,10 @@ InitSummaryData (
/**
Dump performance data.
-
+
@param[in] ImageHandle The image handle.
@param[in] SystemTable The system table.
-
+
@retval SHELL_SUCCESS Command completed successfully.
@retval SHELL_INVALID_PARAMETER Command usage error.
@retval SHELL_ABORTED The user aborts the operation.
@@ -952,7 +952,7 @@ RunDp (
**** Cooked (Default)
****************************************************************************/
GatherStatistics (CustomCumulativeData);
- if (CumulativeMode) {
+ if (CumulativeMode) {
ProcessCumulative (CustomCumulativeData);
} else if (AllMode) {
Status = DumpAllTrace( Number2Display, ExcludeMode);
diff --git a/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.uni b/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.uni
index ced8a48742..e66d9ac6bc 100644
--- a/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.uni
+++ b/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.uni
@@ -7,7 +7,7 @@
// 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
// http://opensource.org/licenses/bsd-license.php
-//
+//
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
//
@@ -108,7 +108,7 @@
" -t VALUE - Sets display threshold to VALUE microseconds\r\n"
" -n COUNT - Limits display to COUNT lines in All and Raw modes\r\n"
" -i - Displays identifier\r\n"
-" -c TOKEN - Display pre-defined and custom cumulative data\r\n"
+" -c TOKEN - Display pre-defined and custom cumulative data\r\n"
" Pre-defined cumulative token are:\r\n"
" 1. LoadImage:\r\n"
" 2. StartImage:\r\n"
diff --git a/ShellPkg/DynamicCommand/DpDynamicCommand/DpInternal.h b/ShellPkg/DynamicCommand/DpDynamicCommand/DpInternal.h
index d8bc7453d2..d5eb4229c7 100644
--- a/ShellPkg/DynamicCommand/DpDynamicCommand/DpInternal.h
+++ b/ShellPkg/DynamicCommand/DpDynamicCommand/DpInternal.h
@@ -44,24 +44,24 @@ extern UINT32 const NumCum;
///@}
-/**
+/**
Calculate an event's duration in timer ticks.
-
+
Given the count direction and the event's start and end timer values,
calculate the duration of the event in timer ticks. Information for
the current measurement is pointed to by the parameter.
-
+
If the measurement's start time is 1, it indicates that the developer
is indicating that the measurement began at the release of reset.
The start time is adjusted to the timer's starting count before performing
the elapsed time calculation.
-
+
The calculated duration, in ticks, is the absolute difference between
the measurement's ending and starting counts.
-
+
@param Measurement Pointer to a MEASUREMENT_RECORD structure containing
data for the current measurement.
-
+
@return The 64-bit duration of the event.
**/
UINT64
@@ -69,14 +69,14 @@ GetDuration (
IN OUT MEASUREMENT_RECORD *Measurement
);
-/**
+/**
Determine whether the Measurement record is for an EFI Phase.
-
+
The Token and Module members of the measurement record are checked.
Module must be empty and Token must be one of SEC, PEI, DXE, BDS, or SHELL.
-
+
@param[in] Measurement A pointer to the Measurement record to test.
-
+
@retval TRUE The measurement record is for an EFI Phase.
@retval FALSE The measurement record is NOT for an EFI Phase.
**/
@@ -99,17 +99,17 @@ IsCorePerf(
IN MEASUREMENT_RECORD *Measurement
);
-/**
+/**
Get the file name portion of the Pdb File Name.
-
+
The portion of the Pdb File Name between the last backslash and
either a following period or the end of the string is converted
to Unicode and copied into UnicodeBuffer. The name is truncated,
if necessary, to ensure that UnicodeBuffer is not overrun.
-
+
@param[in] PdbFileName Pdb file name.
@param[out] UnicodeBuffer The resultant Unicode File Name.
-
+
**/
VOID
DpGetShortPdbFileName (
@@ -117,7 +117,7 @@ DpGetShortPdbFileName (
OUT CHAR16 *UnicodeBuffer
);
-/**
+/**
Get a human readable name for an image handle.
The following methods will be tried orderly:
1. Image PDB
@@ -126,29 +126,29 @@ DpGetShortPdbFileName (
4. Image GUID
5. Image DevicePath
6. Unknown Driver Name
-
+
@param[in] Handle
-
+
@post The resulting Unicode name string is stored in the
mGaugeString global array.
-
+
**/
VOID
DpGetNameFromHandle (
IN EFI_HANDLE Handle
);
-/**
+/**
Calculate the Duration in microseconds.
-
+
Duration is multiplied by 1000, instead of Frequency being divided by 1000 or
multiplying the result by 1000, in order to maintain precision. Since Duration is
a 64-bit value, multiplying it by 1000 is unlikely to produce an overflow.
-
+
The time is calculated as (Duration * 1000) / Timer_Frequency.
-
+
@param[in] Duration The event duration in timer ticks.
-
+
@return A 64-bit value which is the Elapsed time in microseconds.
**/
UINT64
@@ -156,16 +156,16 @@ DurationInMicroSeconds (
IN UINT64 Duration
);
-/**
+/**
Get index of Measurement Record's match in the CumData array.
-
+
If the Measurement's Token value matches a Token in one of the CumData
records, the index of the matching record is returned. The returned
index is a signed value so that negative values can indicate that
the Measurement didn't match any entry in the CumData array.
-
+
@param[in] Measurement A pointer to a Measurement Record to match against the CumData array.
-
+
@retval <0 Token is not in the CumData array.
@retval >=0 Return value is the index into CumData where Token is found.
**/
@@ -174,17 +174,17 @@ GetCumulativeItem(
IN MEASUREMENT_RECORD *Measurement
);
-/**
+/**
Collect verbose statistics about the logged performance measurements.
-
+
General Summary information for all Trace measurements is gathered and
stored within the SummaryData structure. This information is both
used internally by subsequent reporting functions, and displayed
at the end of verbose reports.
-
+
@pre The SummaryData and CumData structures must be initialized
prior to calling this function.
-
+
@post The SummaryData and CumData structures contain statistics for the
current performance logs.
@@ -196,23 +196,23 @@ GatherStatistics(
IN OUT PERF_CUM_DATA *CustomCumulativeData OPTIONAL
);
-/**
+/**
Gather and print ALL Trace Records.
-
+
Displays all "interesting" Trace measurements in order.<BR>
The number of records displayed is controlled by:
- records with a duration less than mInterestThreshold microseconds are not displayed.
- No more than Limit records are displayed. A Limit of zero will not limit the output.
- If the ExcludeFlag is TRUE, records matching entries in the CumData array are not
displayed.
-
+
@pre The mInterestThreshold global variable is set to the shortest duration to be printed.
The mGaugeString and mUnicodeToken global arrays are used for temporary string storage.
They must not be in use by a calling function.
-
+
@param[in] Limit The number of records to print. Zero is ALL.
@param[in] ExcludeFlag TRUE to exclude individual Cumulative items from display.
-
+
@retval EFI_SUCCESS The operation was successful.
@retval EFI_ABORTED The user aborts the operation.
@return Others from a call to gBS->LocateHandleBuffer().
@@ -223,20 +223,20 @@ DumpAllTrace(
IN BOOLEAN ExcludeFlag
);
-/**
+/**
Gather and print Raw Trace Records.
-
+
All Trace measurements with a duration greater than or equal to
mInterestThreshold are printed without interpretation.
-
+
The number of records displayed is controlled by:
- records with a duration less than mInterestThreshold microseconds are not displayed.
- No more than Limit records are displayed. A Limit of zero will not limit the output.
- If the ExcludeFlag is TRUE, records matching entries in the CumData array are not
displayed.
-
+
@pre The mInterestThreshold global variable is set to the shortest duration to be printed.
-
+
@param[in] Limit The number of records to print. Zero is ALL.
@param[in] ExcludeFlag TRUE to exclude individual Cumulative items from display.
@retval EFI_SUCCESS The operation was successful.
@@ -248,9 +248,9 @@ DumpRawTrace(
IN BOOLEAN ExcludeFlag
);
-/**
+/**
Gather and print Major Phase metrics.
-
+
**/
VOID
ProcessPhases(
@@ -258,11 +258,11 @@ ProcessPhases(
);
-/**
+/**
Gather and print Handle data.
-
+
@param[in] ExcludeFlag TRUE to exclude individual Cumulative items from display.
-
+
@retval EFI_SUCCESS The operation was successful.
@retval EFI_ABORTED The user aborts the operation.
@return Others from a call to gBS->LocateHandleBuffer().
@@ -273,11 +273,11 @@ ProcessHandles(
);
-/**
+/**
Gather and print PEIM data.
-
+
Only prints complete PEIM records
-
+
@retval EFI_SUCCESS The operation was successful.
@retval EFI_ABORTED The user aborts the operation.
**/
@@ -286,14 +286,14 @@ ProcessPeims(
VOID
);
-/**
+/**
Gather and print global data.
-
+
Strips out incomplete or "Execution Phase" records
Only prints records where Handle is NULL
Increment TIndex for every record, even skipped ones, so that we have an
indication of every measurement record taken.
-
+
@retval EFI_SUCCESS The operation was successful.
@retval EFI_ABORTED The user aborts the operation.
**/
@@ -302,16 +302,16 @@ ProcessGlobal(
VOID
);
-/**
+/**
Gather and print cumulative data.
-
+
Traverse the measurement records and:<BR>
For each record with a Token listed in the CumData array:<BR>
- Update the instance count and the total, minimum, and maximum durations.
Finally, print the gathered cumulative statistics.
@param[in] CustomCumulativeData The pointer to the custom cumulative data.
-
+
**/
VOID
ProcessCumulative(
diff --git a/ShellPkg/DynamicCommand/DpDynamicCommand/DpUtilities.c b/ShellPkg/DynamicCommand/DpDynamicCommand/DpUtilities.c
index 5c6ab209d5..25311860ef 100644
--- a/ShellPkg/DynamicCommand/DpDynamicCommand/DpUtilities.c
+++ b/ShellPkg/DynamicCommand/DpDynamicCommand/DpUtilities.c
@@ -39,24 +39,24 @@
#include "Literals.h"
#include "DpInternal.h"
-/**
+/**
Calculate an event's duration in timer ticks.
-
+
Given the count direction and the event's start and end timer values,
calculate the duration of the event in timer ticks. Information for
the current measurement is pointed to by the parameter.
-
+
If the measurement's start time is 1, it indicates that the developer
is indicating that the measurement began at the release of reset.
The start time is adjusted to the timer's starting count before performing
the elapsed time calculation.
-
+
The calculated duration, in ticks, is the absolute difference between
the measurement's ending and starting counts.
-
+
@param Measurement Pointer to a MEASUREMENT_RECORD structure containing
data for the current measurement.
-
+
@return The 64-bit duration of the event.
**/
UINT64
@@ -81,14 +81,14 @@ GetDuration (
return Duration;
}
-/**
+/**
Determine whether the Measurement record is for an EFI Phase.
-
+
The Token and Module members of the measurement record are checked.
Module must be empty and Token must be one of SEC, PEI, DXE, BDS, or SHELL.
-
+
@param[in] Measurement A pointer to the Measurement record to test.
-
+
@retval TRUE The measurement record is for an EFI Phase.
@retval FALSE The measurement record is NOT for an EFI Phase.
**/
@@ -139,17 +139,17 @@ IsCorePerf(
return RetVal;
}
-/**
+/**
Get the file name portion of the Pdb File Name.
-
+
The portion of the Pdb File Name between the last backslash and
either a following period or the end of the string is converted
to Unicode and copied into UnicodeBuffer. The name is truncated,
if necessary, to ensure that UnicodeBuffer is not overrun.
-
+
@param[in] PdbFileName Pdb file name.
@param[out] UnicodeBuffer The resultant Unicode File Name.
-
+
**/
VOID
DpGetShortPdbFileName (
@@ -192,7 +192,7 @@ DpGetShortPdbFileName (
}
}
-/**
+/**
Get a human readable name for an image handle.
The following methods will be tried orderly:
1. Image PDB
@@ -377,17 +377,17 @@ DpGetNameFromHandle (
FreePool (StringPtr);
}
-/**
+/**
Calculate the Duration in microseconds.
-
+
Duration is multiplied by 1000, instead of Frequency being divided by 1000 or
multiplying the result by 1000, in order to maintain precision. Since Duration is
a 64-bit value, multiplying it by 1000 is unlikely to produce an overflow.
-
+
The time is calculated as (Duration * 1000) / Timer_Frequency.
-
+
@param[in] Duration The event duration in timer ticks.
-
+
@return A 64-bit value which is the Elapsed time in microseconds.
**/
UINT64
@@ -398,16 +398,16 @@ DurationInMicroSeconds (
return DivU64x32 (Duration, 1000);
}
-/**
+/**
Get index of Measurement Record's match in the CumData array.
-
+
If the Measurement's Token value matches a Token in one of the CumData
records, the index of the matching record is returned. The returned
index is a signed value so that negative values can indicate that
the Measurement didn't match any entry in the CumData array.
-
+
@param[in] Measurement A pointer to a Measurement Record to match against the CumData array.
-
+
@retval <0 Token is not in the CumData array.
@retval >=0 Return value is the index into CumData where Token is found.
**/
diff --git a/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.c b/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.c
index 8569c966dd..e2491cd54c 100644
--- a/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.c
+++ b/ShellPkg/DynamicCommand/TftpDynamicCommand/Tftp.c
@@ -2,7 +2,7 @@
The implementation for the 'tftp' Shell command.
Copyright (c) 2015, ARM Ltd. All rights reserved.<BR>
- Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved. <BR>
+ Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved. <BR>
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
This program and the accompanying materials
@@ -50,8 +50,8 @@ STATIC CONST CHAR16 mTftpProgressDelete[] = L"\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b
@return TRUE The value was returned.
@return FALSE A parsing error occured.
**/
-STATIC
-BOOLEAN
+STATIC
+BOOLEAN
StringToUint16 (
IN CONST CHAR16 *ValueStr,
OUT UINT16 *Value
@@ -64,7 +64,7 @@ StringToUint16 (
@param[in] NicNumber The network physical device number.
@param[out] NicName Address where to store the NIC name.
The memory area has to be at least
- IP4_CONFIG2_INTERFACE_INFO_NAME_LENGTH
+ IP4_CONFIG2_INTERFACE_INFO_NAME_LENGTH
double byte wide.
@return EFI_SUCCESS The name of the NIC was returned.
@@ -75,8 +75,8 @@ StringToUint16 (
Managed Network Protocol could not be
read.
**/
-STATIC
-EFI_STATUS
+STATIC
+EFI_STATUS
GetNicName (
IN EFI_HANDLE ControllerHandle,
IN UINTN NicNumber,
@@ -102,8 +102,8 @@ GetNicName (
@return Others Either the creation of the child or the opening
of the protocol failed.
**/
-STATIC
-EFI_STATUS
+STATIC
+EFI_STATUS
CreateServiceChildAndOpenProtocol (
IN EFI_HANDLE ControllerHandle,
IN EFI_GUID *ServiceBindingProtocolGuid,
@@ -124,8 +124,8 @@ CreateServiceChildAndOpenProtocol (
@param[in] ChildHandle Handle of the child to be destroyed.
**/
-STATIC
-VOID
+STATIC
+VOID
CloseProtocolAndDestroyServiceChild (
IN EFI_HANDLE ControllerHandle,
IN EFI_GUID *ServiceBindingProtocolGuid,
@@ -148,8 +148,8 @@ CloseProtocolAndDestroyServiceChild (
(see EFI_MTFTP4_PROTOCOL.GetInfo() status codes)
or error when parsing the response of the server.
**/
-STATIC
-EFI_STATUS
+STATIC
+EFI_STATUS
GetFileSize (
IN EFI_MTFTP4_PROTOCOL *Mtftp4,
IN CONST CHAR8 *FilePath,
@@ -175,8 +175,8 @@ GetFileSize (
(see EFI_MTFTP4_PROTOCOL.ReadFile() status codes).
**/
-STATIC
-EFI_STATUS
+STATIC
+EFI_STATUS
DownloadFile (
IN EFI_MTFTP4_PROTOCOL *Mtftp4,
IN CONST CHAR16 *FilePath,
@@ -198,8 +198,8 @@ DownloadFile (
@retval EFI_SUCCESS All packets are accepted.
**/
-STATIC
-EFI_STATUS
+STATIC
+EFI_STATUS
EFIAPI
CheckPacket (
IN EFI_MTFTP4_PROTOCOL *This,
@@ -623,7 +623,7 @@ StringToUint16 (
@param[in] NicNumber The network physical device number.
@param[out] NicName Address where to store the NIC name.
The memory area has to be at least
- IP4_CONFIG2_INTERFACE_INFO_NAME_LENGTH
+ IP4_CONFIG2_INTERFACE_INFO_NAME_LENGTH
double byte wide.
@return EFI_SUCCESS The name of the NIC was returned.