diff --git a/RedfishPkg/Include/RedfishCommon.h b/RedfishPkg/Include/RedfishCommon.h new file mode 100644 index 0000000000..18244e9855 --- /dev/null +++ b/RedfishPkg/Include/RedfishCommon.h @@ -0,0 +1,17 @@ +/** @file + This header file defines common macros for the use in RedfishPkg. + + Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef REDFISH_COMMON_H_ +#define REDFISH_COMMON_H_ + +#ifndef IS_EMPTY_STRING +#define IS_EMPTY_STRING(a) ((a) == NULL || (a)[0] == '\0') +#endif + +#endif diff --git a/RedfishPkg/Library/RedfishDebugLib/RedfishDebugLib.c b/RedfishPkg/Library/RedfishDebugLib/RedfishDebugLib.c index f8bb51ff53..694a087815 100644 --- a/RedfishPkg/Library/RedfishDebugLib/RedfishDebugLib.c +++ b/RedfishPkg/Library/RedfishDebugLib/RedfishDebugLib.c @@ -9,7 +9,7 @@ **/ #include - +#include #include #include #include @@ -17,10 +17,6 @@ #include #include -#ifndef IS_EMPTY_STRING -#define IS_EMPTY_STRING(a) ((a) == NULL || (a)[0] == '\0') -#endif - #define REDFISH_JSON_STRING_LENGTH 200 #define REDFISH_JSON_OUTPUT_FORMAT (EDKII_JSON_COMPACT | EDKII_JSON_INDENT(2)) #define REDFISH_PRINT_BUFFER_BYTES_PER_ROW 16 diff --git a/RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.h b/RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.h index 4988afab44..271f884ec9 100644 --- a/RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.h +++ b/RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.h @@ -3,6 +3,7 @@ (C) Copyright 2020 Hewlett Packard Enterprise Development LP
(C) Copyright 2024 American Megatrends International LLC
+ Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent @@ -11,6 +12,7 @@ #ifndef EDKII_REDFISH_CREDENTIAL_DXE_H_ #define EDKII_REDFISH_CREDENTIAL_DXE_H_ +#include #include #include @@ -29,10 +31,6 @@ #define REDFISH_MANAGER_ACCOUNT_COLLECTION_URI L"AccountService/Accounts" #define REDFISH_URI_LENGTH 128 -#ifndef IS_EMPTY_STRING -#define IS_EMPTY_STRING(a) ((a) == NULL || (a)[0] == '\0') -#endif - /// /// Definition of REDFISH_SERVICE_LIST /// diff --git a/RedfishPkg/RedfishHttpDxe/RedfishHttpDxe.h b/RedfishPkg/RedfishHttpDxe/RedfishHttpDxe.h index 0c40423655..38c3cd24a4 100644 --- a/RedfishPkg/RedfishHttpDxe/RedfishHttpDxe.h +++ b/RedfishPkg/RedfishHttpDxe/RedfishHttpDxe.h @@ -11,6 +11,7 @@ #define EDKII_REDFISH_HTTP_DXE_H_ #include +#include #include #include @@ -31,7 +32,6 @@ #include #include -#define IS_EMPTY_STRING(a) ((a) == NULL || (a)[0] == '\0') #define REDFISH_HTTP_CACHE_LIST_SIZE 0x80 #define REDFISH_ERROR_MSG_MAX 128 #define REDFISH_DEBUG_STRING_LENGTH 200 diff --git a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.h b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.h index 525ca43fa9..9ac7f26857 100644 --- a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.h +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.h @@ -13,6 +13,7 @@ #define EDKII_REDFISH_PLATFORM_CONFIG_IMPL_H_ #include +#include // // Libraries @@ -27,7 +28,6 @@ #include #include -#define IS_EMPTY_STRING(a) (a == NULL || a[0] == L'\0') #define ENGLISH_LANGUAGE_CODE "en-US" #define X_UEFI_SCHEMA_PREFIX "x-UEFI-redfish-"