[edk2-devel] [PATCH v2 03/14] RedfishPkg: get rid of unused definitions from RedfishCrtLib.h

Mike Maslenkin posted 14 patches 2 years, 1 month ago
Only 13 patches received!
There is a newer version of this series
[edk2-devel] [PATCH v2 03/14] RedfishPkg: get rid of unused definitions from RedfishCrtLib.h
Posted by Mike Maslenkin 2 years, 1 month ago
It seems that initial implementation of this header file is based on
CrtLibSupport.h from CryptoPkg. But uid, euid, gid, egid and sa_family_t
sre not used in RedfishPkg. So remove them.

Also take "true" and "false" definition from MdePkg's LibFdtSupport.h
header file, that also seems based on a header mentioned above.

Cc: Abner Chang <abner.chang@amd.com>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Igor Kulchytskyy <igork@ami.com>
Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
---
 RedfishPkg/Include/Library/RedfishCrtLib.h | 45 ++++++----------------
 1 file changed, 11 insertions(+), 34 deletions(-)

diff --git a/RedfishPkg/Include/Library/RedfishCrtLib.h b/RedfishPkg/Include/Library/RedfishCrtLib.h
index ac6c5162ad6a..0c51a03d0e1a 100644
--- a/RedfishPkg/Include/Library/RedfishCrtLib.h
+++ b/RedfishPkg/Include/Library/RedfishCrtLib.h
@@ -69,20 +69,17 @@
 //
 // Basic types mapping
 //
-typedef UINTN   size_t;
-typedef INTN    ssize_t;
-typedef INT32   time_t;
-typedef UINT8   __uint8_t;
-typedef UINT8   sa_family_t;
-typedef UINT32  uid_t;
-typedef UINT32  gid_t;
-typedef INT32   int32_t;
-typedef UINT32  uint32_t;
-typedef UINT16  uint16_t;
-typedef UINT8   uint8_t;
-typedef enum {
-  false, true
-} bool;
+typedef UINTN    size_t;
+typedef INTN     ssize_t;
+typedef INT32    time_t;
+typedef INT32    int32_t;
+typedef UINT32   uint32_t;
+typedef UINT16   uint16_t;
+typedef UINT8    uint8_t;
+typedef BOOLEAN  bool;
+
+#define true   (1 == 1)
+#define false  (1 == 0)
 
 //
 // File operations are not required for EFI building,
@@ -343,26 +340,6 @@ fgetc       (
   FILE  *_File
   );
 
-uid_t
-getuid      (
-  void
-  );
-
-uid_t
-geteuid     (
-  void
-  );
-
-gid_t
-getgid      (
-  void
-  );
-
-gid_t
-getegid     (
-  void
-  );
-
 void
 qsort       (
   void *,
-- 
2.32.0 (Apple Git-132)



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#112552): https://edk2.groups.io/g/devel/message/112552
Mute This Topic: https://groups.io/mt/103181038/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v2 03/14] RedfishPkg: get rid of unused definitions from RedfishCrtLib.h
Posted by Chang, Abner via groups.io 2 years, 1 month ago
[Public]

Not able to apply this patch from either email or group.io. You may want to try option "--transfer-encoding=8bit" when git send-email.

Reviewed-by: Abner Chang <abner.chang@amd.com>


> -----Original Message-----
> From: Mike Maslenkin <mike.maslenkin@gmail.com>
> Sent: Friday, December 15, 2023 7:25 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner <Abner.Chang@amd.com>; nicklew@nvidia.com;
> igork@ami.com; Mike Maslenkin <mike.maslenkin@gmail.com>
> Subject: [PATCH v2 03/14] RedfishPkg: get rid of unused definitions from
> RedfishCrtLib.h
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> It seems that initial implementation of this header file is based on
> CrtLibSupport.h from CryptoPkg. But uid, euid, gid, egid and sa_family_t
> sre not used in RedfishPkg. So remove them.
>
> Also take "true" and "false" definition from MdePkg's LibFdtSupport.h
> header file, that also seems based on a header mentioned above.
>
> Cc: Abner Chang <abner.chang@amd.com>
> Cc: Nickle Wang <nicklew@nvidia.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
> ---
>  RedfishPkg/Include/Library/RedfishCrtLib.h | 45 ++++++----------------
>  1 file changed, 11 insertions(+), 34 deletions(-)
>
> diff --git a/RedfishPkg/Include/Library/RedfishCrtLib.h
> b/RedfishPkg/Include/Library/RedfishCrtLib.h
> index ac6c5162ad6a..0c51a03d0e1a 100644
> --- a/RedfishPkg/Include/Library/RedfishCrtLib.h
> +++ b/RedfishPkg/Include/Library/RedfishCrtLib.h
> @@ -69,20 +69,17 @@
>  //
>
>  // Basic types mapping
>
>  //
>
> -typedef UINTN   size_t;
>
> -typedef INTN    ssize_t;
>
> -typedef INT32   time_t;
>
> -typedef UINT8   __uint8_t;
>
> -typedef UINT8   sa_family_t;
>
> -typedef UINT32  uid_t;
>
> -typedef UINT32  gid_t;
>
> -typedef INT32   int32_t;
>
> -typedef UINT32  uint32_t;
>
> -typedef UINT16  uint16_t;
>
> -typedef UINT8   uint8_t;
>
> -typedef enum {
>
> -  false, true
>
> -} bool;
>
> +typedef UINTN    size_t;
>
> +typedef INTN     ssize_t;
>
> +typedef INT32    time_t;
>
> +typedef INT32    int32_t;
>
> +typedef UINT32   uint32_t;
>
> +typedef UINT16   uint16_t;
>
> +typedef UINT8    uint8_t;
>
> +typedef BOOLEAN  bool;
>
> +
>
> +#define true   (1 == 1)
>
> +#define false  (1 == 0)
>
>
>
>  //
>
>  // File operations are not required for EFI building,
>
> @@ -343,26 +340,6 @@ fgetc       (
>    FILE  *_File
>
>    );
>
>
>
> -uid_t
>
> -getuid      (
>
> -  void
>
> -  );
>
> -
>
> -uid_t
>
> -geteuid     (
>
> -  void
>
> -  );
>
> -
>
> -gid_t
>
> -getgid      (
>
> -  void
>
> -  );
>
> -
>
> -gid_t
>
> -getegid     (
>
> -  void
>
> -  );
>
> -
>
>  void
>
>  qsort       (
>
>    void *,
>
> --
> 2.32.0 (Apple Git-132)



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#112619): https://edk2.groups.io/g/devel/message/112619
Mute This Topic: https://groups.io/mt/103181038/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-