public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 1/1] BaseTools: remove useless header inclusion
@ 2023-01-26 10:03 tlaronde
  2023-01-29  1:59 ` 回复: " gaoliming
  0 siblings, 1 reply; 4+ messages in thread
From: tlaronde @ 2023-01-26 10:03 UTC (permalink / raw)
  To: devel; +Cc: Bob Feng, Liming Gao, Yuwei Chen

GenFvInternalLib.c: useless inclusion and dependency on uuid.h.

>From 6c0ba96fa11390750e102ebd277f59ef38970394 Mon Sep 17 00:00:00 2001
From: Thierry LARONDE <tlaronde@polynum.com>
Date: Thu, 26 Jan 2023 10:49:12 +0100
Subject: [PATCH] Remove useless uuid.h include.

Signed-off-by: Thierry LARONDE <tlaronde@polynum.com>
---
 BaseTools/Source/C/GenFv/GenFvInternalLib.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
index 6bd59515b1..2df7182f8b 100644
--- a/BaseTools/Source/C/GenFv/GenFvInternalLib.c
+++ b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
@@ -14,11 +14,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 // Include files
 //
 
-#if defined(__FreeBSD__)
-#include <uuid.h>
-#elif defined(__GNUC__)
-#include <uuid/uuid.h>
-#endif
 #ifdef __GNUC__
 #include <sys/stat.h>
 #endif
-- 
2.39.0

-- 
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                     http://www.kergis.com/
                    http://kertex.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* 回复: [PATCH 1/1] BaseTools: remove useless header inclusion
  2023-01-26 10:03 [PATCH 1/1] BaseTools: remove useless header inclusion tlaronde
@ 2023-01-29  1:59 ` gaoliming
  2023-01-29  9:45   ` [edk2-devel] ??: " tlaronde
  0 siblings, 1 reply; 4+ messages in thread
From: gaoliming @ 2023-01-29  1:59 UTC (permalink / raw)
  To: tlaronde, devel; +Cc: 'Bob Feng', 'Yuwei Chen'

With this change, does GenFv pass build on Linux environment?

> -----邮件原件-----
> 发件人: tlaronde@polynum.com <tlaronde@polynum.com>
> 发送时间: 2023年1月26日 18:03
> 收件人: devel@edk2.groups.io
> 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Yuwei Chen <yuwei.chen@intel.com>
> 主题: [PATCH 1/1] BaseTools: remove useless header inclusion
> 
> GenFvInternalLib.c: useless inclusion and dependency on uuid.h.
> 
> From 6c0ba96fa11390750e102ebd277f59ef38970394 Mon Sep 17 00:00:00
> 2001
> From: Thierry LARONDE <tlaronde@polynum.com>
> Date: Thu, 26 Jan 2023 10:49:12 +0100
> Subject: [PATCH] Remove useless uuid.h include.
> 
> Signed-off-by: Thierry LARONDE <tlaronde@polynum.com>
> ---
>  BaseTools/Source/C/GenFv/GenFvInternalLib.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c
> b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
> index 6bd59515b1..2df7182f8b 100644
> --- a/BaseTools/Source/C/GenFv/GenFvInternalLib.c
> +++ b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
> @@ -14,11 +14,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
>  // Include files
>  //
> 
> -#if defined(__FreeBSD__)
> -#include <uuid.h>
> -#elif defined(__GNUC__)
> -#include <uuid/uuid.h>
> -#endif
>  #ifdef __GNUC__
>  #include <sys/stat.h>
>  #endif
> --
> 2.39.0
> 
> --
>         Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
>                      http://www.kergis.com/
>                     http://kertex.kergis.com/
> Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] ??: [PATCH 1/1] BaseTools: remove useless header inclusion
  2023-01-29  1:59 ` 回复: " gaoliming
@ 2023-01-29  9:45   ` tlaronde
  2023-01-30  6:42     ` Bob Feng
  0 siblings, 1 reply; 4+ messages in thread
From: tlaronde @ 2023-01-29  9:45 UTC (permalink / raw)
  To: devel, gaoliming; +Cc: 'Bob Feng', 'Yuwei Chen'

Hello,

Le Sun, Jan 29, 2023 at 09:59:29AM +0800, gaoliming via groups.io a écrit :
> With this change, does GenFv pass build on Linux environment?

It should: there is absolutely nothing in GenFvInternalLib.c using
uuid_* or UUID_*. Furthermore, the API exposed by FreeBSD uuid.h and
util-linux-ng uuid/uuid.h are totally different; so this is why I
wondered, from the start, what the inclusions were achieving.

If the Linux build should fail, this would be by side-effect because a
header included via uuid.h is missing.

I can not test a Linux environment: I have none.

BTW, in the patch, I should have removed the -luuid in GNUMakefile too.

> 
> > -----????-----
> > ???: tlaronde@polynum.com <tlaronde@polynum.com>
> > ????: 2023?1?26? 18:03
> > ???: devel@edk2.groups.io
> > ??: Bob Feng <bob.c.feng@intel.com>; Liming Gao
> > <gaoliming@byosoft.com.cn>; Yuwei Chen <yuwei.chen@intel.com>
> > ??: [PATCH 1/1] BaseTools: remove useless header inclusion
> > 
> > GenFvInternalLib.c: useless inclusion and dependency on uuid.h.
> > 
> > From 6c0ba96fa11390750e102ebd277f59ef38970394 Mon Sep 17 00:00:00
> > 2001
> > From: Thierry LARONDE <tlaronde@polynum.com>
> > Date: Thu, 26 Jan 2023 10:49:12 +0100
> > Subject: [PATCH] Remove useless uuid.h include.
> > 
> > Signed-off-by: Thierry LARONDE <tlaronde@polynum.com>
> > ---
> >  BaseTools/Source/C/GenFv/GenFvInternalLib.c | 5 -----
> >  1 file changed, 5 deletions(-)
> > 
> > diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c
> > b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
> > index 6bd59515b1..2df7182f8b 100644
> > --- a/BaseTools/Source/C/GenFv/GenFvInternalLib.c
> > +++ b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
> > @@ -14,11 +14,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> >  // Include files
> >  //
> > 
> > -#if defined(__FreeBSD__)
> > -#include <uuid.h>
> > -#elif defined(__GNUC__)
> > -#include <uuid/uuid.h>
> > -#endif
> >  #ifdef __GNUC__
> >  #include <sys/stat.h>
> >  #endif
> > --
> > 2.39.0
> > 
> > --
> >         Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
> >                      http://www.kergis.com/
> >                     http://kertex.kergis.com/
> > Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C
> 
> 
> 
> 
> 
> 
> 

-- 
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                     http://www.kergis.com/
                    http://kertex.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] ??: [PATCH 1/1] BaseTools: remove useless header inclusion
  2023-01-29  9:45   ` [edk2-devel] ??: " tlaronde
@ 2023-01-30  6:42     ` Bob Feng
  0 siblings, 0 replies; 4+ messages in thread
From: Bob Feng @ 2023-01-30  6:42 UTC (permalink / raw)
  To: devel@edk2.groups.io, tlaronde@polynum.com, Gao, Liming; +Cc: Chen, Christine

There is no build failure on Linux. Refer to: https://github.com/tianocore/edk2/pull/3966

Thierry, would you update the patch to remove the -luuid in GNUMakefile too? And trigger a edk2 CI to test it?

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of tlaronde@polynum.com
Sent: Sunday, January 29, 2023 5:45 PM
To: devel@edk2.groups.io; Gao, Liming <gaoliming@byosoft.com.cn>
Cc: Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com>
Subject: Re: [edk2-devel] ??: [PATCH 1/1] BaseTools: remove useless header inclusion

Hello,

Le Sun, Jan 29, 2023 at 09:59:29AM +0800, gaoliming via groups.io a écrit :
> With this change, does GenFv pass build on Linux environment?

It should: there is absolutely nothing in GenFvInternalLib.c using
uuid_* or UUID_*. Furthermore, the API exposed by FreeBSD uuid.h and util-linux-ng uuid/uuid.h are totally different; so this is why I wondered, from the start, what the inclusions were achieving.

If the Linux build should fail, this would be by side-effect because a header included via uuid.h is missing.

I can not test a Linux environment: I have none.

BTW, in the patch, I should have removed the -luuid in GNUMakefile too.

> 
> > -----????-----
> > ???: tlaronde@polynum.com <tlaronde@polynum.com>
> > ????: 2023?1?26? 18:03
> > ???: devel@edk2.groups.io
> > ??: Bob Feng <bob.c.feng@intel.com>; Liming Gao 
> > <gaoliming@byosoft.com.cn>; Yuwei Chen <yuwei.chen@intel.com>
> > ??: [PATCH 1/1] BaseTools: remove useless header inclusion
> > 
> > GenFvInternalLib.c: useless inclusion and dependency on uuid.h.
> > 
> > From 6c0ba96fa11390750e102ebd277f59ef38970394 Mon Sep 17 00:00:00
> > 2001
> > From: Thierry LARONDE <tlaronde@polynum.com>
> > Date: Thu, 26 Jan 2023 10:49:12 +0100
> > Subject: [PATCH] Remove useless uuid.h include.
> > 
> > Signed-off-by: Thierry LARONDE <tlaronde@polynum.com>
> > ---
> >  BaseTools/Source/C/GenFv/GenFvInternalLib.c | 5 -----
> >  1 file changed, 5 deletions(-)
> > 
> > diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c
> > b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
> > index 6bd59515b1..2df7182f8b 100644
> > --- a/BaseTools/Source/C/GenFv/GenFvInternalLib.c
> > +++ b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
> > @@ -14,11 +14,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent  // 
> > Include files  //
> > 
> > -#if defined(__FreeBSD__)
> > -#include <uuid.h>
> > -#elif defined(__GNUC__)
> > -#include <uuid/uuid.h>
> > -#endif
> >  #ifdef __GNUC__
> >  #include <sys/stat.h>
> >  #endif
> > --
> > 2.39.0
> > 
> > --
> >         Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
> >                      http://www.kergis.com/
> >                     http://kertex.kergis.com/ Key fingerprint = 0FF7 
> > E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C
> 
> 
> 
> 
> 
> 
> 

-- 
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                     http://www.kergis.com/
                    http://kertex.kergis.com/ Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-30  6:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-26 10:03 [PATCH 1/1] BaseTools: remove useless header inclusion tlaronde
2023-01-29  1:59 ` 回复: " gaoliming
2023-01-29  9:45   ` [edk2-devel] ??: " tlaronde
2023-01-30  6:42     ` Bob Feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox