summaryrefslogtreecommitdiffstats
path: root/EmulatorPkg/Application
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2021-12-05 14:53:57 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-12-07 17:24:28 +0000
commita550d468a6ca577d9e9c57a0eafcf2fc9fbb8c97 (patch)
tree16ea0a059e01bb8af07f41dcea5996424c309a95 /EmulatorPkg/Application
parente7108d0e9655b1795c94ac372b0449f28dd907df (diff)
downloadedk2-a550d468a6ca577d9e9c57a0eafcf2fc9fbb8c97.tar.gz
edk2-a550d468a6ca577d9e9c57a0eafcf2fc9fbb8c97.tar.bz2
edk2-a550d468a6ca577d9e9c57a0eafcf2fc9fbb8c97.zip
EmulatorPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the EmulatorPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'EmulatorPkg/Application')
-rw-r--r--EmulatorPkg/Application/RedfishPlatformConfig/RedfishPlatformConfig.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/EmulatorPkg/Application/RedfishPlatformConfig/RedfishPlatformConfig.c b/EmulatorPkg/Application/RedfishPlatformConfig/RedfishPlatformConfig.c
index 89d4c760a7..9253b2245f 100644
--- a/EmulatorPkg/Application/RedfishPlatformConfig/RedfishPlatformConfig.c
+++ b/EmulatorPkg/Application/RedfishPlatformConfig/RedfishPlatformConfig.c
@@ -17,8 +17,8 @@
#include <Library/UefiLib.h>
#include <Protocol/ShellParameters.h>
-UINTN Argc;
-CHAR16 **Argv;
+UINTN Argc;
+CHAR16 **Argv;
/**
@@ -31,15 +31,15 @@ GetArg (
VOID
)
{
- EFI_STATUS Status;
- EFI_SHELL_PARAMETERS_PROTOCOL *ShellParameters;
+ EFI_STATUS Status;
+ EFI_SHELL_PARAMETERS_PROTOCOL *ShellParameters;
Status = gBS->HandleProtocol (
gImageHandle,
&gEfiShellParametersProtocolGuid,
- (VOID**)&ShellParameters
+ (VOID **)&ShellParameters
);
- if (EFI_ERROR(Status)) {
+ if (EFI_ERROR (Status)) {
return Status;
}
@@ -84,8 +84,8 @@ UefiMain (
IN EFI_SYSTEM_TABLE *SystemTable
)
{
- EFI_STATUS Status;
- RETURN_STATUS ReturnStatus;
+ EFI_STATUS Status;
+ RETURN_STATUS ReturnStatus;
UINT8 HostIpAssignmentType;
EFI_IPv4_ADDRESS HostIpAddress;
@@ -94,8 +94,8 @@ UefiMain (
EFI_IPv4_ADDRESS RedfishServiceIpMask;
UINTN RedfishServiceIpPort;
- Status = GetArg();
- if (EFI_ERROR(Status)) {
+ Status = GetArg ();
+ if (EFI_ERROR (Status)) {
return Status;
}
@@ -104,39 +104,41 @@ UefiMain (
// RedfishPlatformConfig.efi -s HostIpAddress HostIpMask RedfishServiceIpAddress RedfishServiceIpMask RedfishServiceIpPort
// RedfishPlatformConfig.efi -a RedfishServiceIpAddress RedfishServiceIpMask RedfishServiceIpPort
//
- if (Argc != 7 && Argc != 5) {
-
- PrintHelp();
+ if ((Argc != 7) && (Argc != 5)) {
+ PrintHelp ();
return EFI_UNSUPPORTED;
}
- if (StrCmp(Argv[1], L"-s") == 0) {
-
+ if (StrCmp (Argv[1], L"-s") == 0) {
HostIpAssignmentType = 1;
Status = NetLibStrToIp4 (Argv[2], &HostIpAddress);
if (EFI_ERROR (Status)) {
- PrintHelp();
+ PrintHelp ();
return Status;
}
+
Status = NetLibStrToIp4 (Argv[3], &HostIpMask);
if (EFI_ERROR (Status)) {
- PrintHelp();
+ PrintHelp ();
return Status;
}
+
Status = NetLibStrToIp4 (Argv[4], &RedfishServiceIpAddress);
if (EFI_ERROR (Status)) {
- PrintHelp();
+ PrintHelp ();
return Status;
}
+
Status = NetLibStrToIp4 (Argv[5], &RedfishServiceIpMask);
if (EFI_ERROR (Status)) {
- PrintHelp();
+ PrintHelp ();
return Status;
}
+
ReturnStatus = StrDecimalToUintnS (Argv[6], NULL, &RedfishServiceIpPort);
if (RETURN_ERROR (ReturnStatus)) {
- PrintHelp();
+ PrintHelp ();
return Status;
}
@@ -214,24 +216,24 @@ UefiMain (
Print (L"RedfishServiceIpMask: %s has been set Successfully!\n", Argv[5]);
Print (L"RedfishServiceIpPort: %s has been set Successfully!\n", Argv[6]);
Print (L"Please Restart!\n");
-
- } else if (StrCmp(Argv[1], L"-a") == 0) {
-
+ } else if (StrCmp (Argv[1], L"-a") == 0) {
HostIpAssignmentType = 3;
Status = NetLibStrToIp4 (Argv[2], &RedfishServiceIpAddress);
if (EFI_ERROR (Status)) {
- PrintHelp();
+ PrintHelp ();
return Status;
}
+
Status = NetLibStrToIp4 (Argv[3], &RedfishServiceIpMask);
if (EFI_ERROR (Status)) {
- PrintHelp();
+ PrintHelp ();
return Status;
}
+
ReturnStatus = StrDecimalToUintnS (Argv[4], NULL, &RedfishServiceIpPort);
if (RETURN_ERROR (ReturnStatus)) {
- PrintHelp();
+ PrintHelp ();
return Status;
}
@@ -285,12 +287,10 @@ UefiMain (
Print (L"RedfishServiceIpMask: %s has been set Successfully!\n", Argv[3]);
Print (L"RedfishServiceIpPort: %s has been set Successfully!\n", Argv[4]);
Print (L"Please Restart!\n");
- } else if (StrCmp(Argv[1], L"-h") == 0 || StrCmp(Argv[1], L"-help") == 0) {
-
- PrintHelp();
+ } else if ((StrCmp (Argv[1], L"-h") == 0) || (StrCmp (Argv[1], L"-help") == 0)) {
+ PrintHelp ();
} else {
-
- PrintHelp();
+ PrintHelp ();
return EFI_UNSUPPORTED;
}