diff mbox

[edk2] EmbeddedPkg/AndroidFastbootTransportTcpDxe: Resolved compiler and build warnings

Message ID 1456832042-7421-1-git-send-email-shivamurthy.shastri@linaro.org
State New
Headers show

Commit Message

Shivamurthy Shastri March 1, 2016, 11:34 a.m. UTC
Resolved below errors:
1. Variable 'gEfiHostnameVariableGuid' used, but not defined GUID.
2. File 'Hostname.h' is included, but it is not available in source.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Shivamurthy Shastri <shivamurthy.shastri@linaro.org>

---
 EmbeddedPkg/EmbeddedPkg.dec         |  2 ++
 EmbeddedPkg/Include/Guid/Hostname.h | 20 ++++++++++++++++++++
 2 files changed, 22 insertions(+)
 create mode 100644 EmbeddedPkg/Include/Guid/Hostname.h

-- 
1.9.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Ard Biesheuvel March 1, 2016, 11:41 a.m. UTC | #1
On 1 March 2016 at 12:34, Shivamurthy Shastri
<shivamurthy.shastri@linaro.org> wrote:
> Resolved below errors:

> 1. Variable 'gEfiHostnameVariableGuid' used, but not defined GUID.

> 2. File 'Hostname.h' is included, but it is not available in source.

>


Interesting. I suppose this code could never be built from the
upstream source since it was merged? Nice.

Anyway, since this GUID is used as a scope identifier for the EFI
variable holding the hostname, I don't think we need a brand new GUID
here. Either gEfiGlobalVariableGuid or gEfiCallerIdGuid (if the
variable is considered private to this module) should be sufficient.

Thanks,
Ard.


> Contributed-under: TianoCore Contribution Agreement 1.0

> Signed-off-by: Shivamurthy Shastri <shivamurthy.shastri@linaro.org>

> ---

>  EmbeddedPkg/EmbeddedPkg.dec         |  2 ++

>  EmbeddedPkg/Include/Guid/Hostname.h | 20 ++++++++++++++++++++

>  2 files changed, 22 insertions(+)

>  create mode 100644 EmbeddedPkg/Include/Guid/Hostname.h

>

> diff --git a/EmbeddedPkg/EmbeddedPkg.dec b/EmbeddedPkg/EmbeddedPkg.dec

> index cd0d96f..2617323 100644

> --- a/EmbeddedPkg/EmbeddedPkg.dec

> +++ b/EmbeddedPkg/EmbeddedPkg.dec

> @@ -55,6 +55,8 @@

>    # Include/Guid/FdtHob.h

>    gFdtHobGuid   = { 0x16958446, 0x19B7, 0x480B, { 0xB0, 0x47, 0x74, 0x85, 0xAD, 0x3F, 0x71, 0x6D } }

>    gFdtVariableGuid = { 0x25a4fd4a, 0x9703, 0x4ba9, { 0xa1, 0x90, 0xb7, 0xc8, 0x4e, 0xfb, 0x3e, 0x57 } }

> +  # Include/Guid/Hostname.h

> +  gEfiHostnameVariableGuid     = { 0xf1851fe8, 0x7d79, 0x43fb, { 0xae, 0x4c, 0x65, 0x7d, 0xd8, 0xd3, 0xc8, 0x80 } }

>

>  [Protocols.common]

>    gHardwareInterruptProtocolGuid =  { 0x2890B3EA, 0x053D, 0x1643, { 0xAD, 0x0C, 0xD6, 0x48, 0x08, 0xDA, 0x3F, 0xF1 } }

> diff --git a/EmbeddedPkg/Include/Guid/Hostname.h b/EmbeddedPkg/Include/Guid/Hostname.h

> new file mode 100644

> index 0000000..6789d89

> --- /dev/null

> +++ b/EmbeddedPkg/Include/Guid/Hostname.h

> @@ -0,0 +1,20 @@

> +/** @file

> +*

> +*  Copyright (c) 2015, Linaro Limited. All rights reserved.

> +*

> +*  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.

> +*

> +**/

> +

> +#ifndef __HOSTNAME_H__

> +#define __HOSTNAME_H__

> +

> +extern EFI_GUID gEfiHostnameVariableGuid;

> +

> +#endif /* __HOSTNAME_H__ */

> --

> 1.9.1

>

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Laszlo Ersek March 1, 2016, 11:51 a.m. UTC | #2
On 03/01/16 12:41, Ard Biesheuvel wrote:
> On 1 March 2016 at 12:34, Shivamurthy Shastri

> <shivamurthy.shastri@linaro.org> wrote:

>> Resolved below errors:

>> 1. Variable 'gEfiHostnameVariableGuid' used, but not defined GUID.

>> 2. File 'Hostname.h' is included, but it is not available in source.

>>

> 

> Interesting. I suppose this code could never be built from the

> upstream source since it was merged? Nice.

> 

> Anyway, since this GUID is used as a scope identifier for the EFI

> variable holding the hostname, I don't think we need a brand new GUID

> here. Either gEfiGlobalVariableGuid or gEfiCallerIdGuid (if the

> variable is considered private to this module) should be sufficient.


the gEfiGlobalVariableGuid namespace allows standardized variables only,
IIRC

> 

> Thanks,

> Ard.

> 

> 

>> Contributed-under: TianoCore Contribution Agreement 1.0

>> Signed-off-by: Shivamurthy Shastri <shivamurthy.shastri@linaro.org>

>> ---

>>  EmbeddedPkg/EmbeddedPkg.dec         |  2 ++

>>  EmbeddedPkg/Include/Guid/Hostname.h | 20 ++++++++++++++++++++

>>  2 files changed, 22 insertions(+)

>>  create mode 100644 EmbeddedPkg/Include/Guid/Hostname.h

>>

>> diff --git a/EmbeddedPkg/EmbeddedPkg.dec b/EmbeddedPkg/EmbeddedPkg.dec

>> index cd0d96f..2617323 100644

>> --- a/EmbeddedPkg/EmbeddedPkg.dec

>> +++ b/EmbeddedPkg/EmbeddedPkg.dec

>> @@ -55,6 +55,8 @@

>>    # Include/Guid/FdtHob.h

>>    gFdtHobGuid   = { 0x16958446, 0x19B7, 0x480B, { 0xB0, 0x47, 0x74, 0x85, 0xAD, 0x3F, 0x71, 0x6D } }

>>    gFdtVariableGuid = { 0x25a4fd4a, 0x9703, 0x4ba9, { 0xa1, 0x90, 0xb7, 0xc8, 0x4e, 0xfb, 0x3e, 0x57 } }

>> +  # Include/Guid/Hostname.h

>> +  gEfiHostnameVariableGuid     = { 0xf1851fe8, 0x7d79, 0x43fb, { 0xae, 0x4c, 0x65, 0x7d, 0xd8, 0xd3, 0xc8, 0x80 } }

>>

>>  [Protocols.common]

>>    gHardwareInterruptProtocolGuid =  { 0x2890B3EA, 0x053D, 0x1643, { 0xAD, 0x0C, 0xD6, 0x48, 0x08, 0xDA, 0x3F, 0xF1 } }

>> diff --git a/EmbeddedPkg/Include/Guid/Hostname.h b/EmbeddedPkg/Include/Guid/Hostname.h

>> new file mode 100644

>> index 0000000..6789d89

>> --- /dev/null

>> +++ b/EmbeddedPkg/Include/Guid/Hostname.h

>> @@ -0,0 +1,20 @@

>> +/** @file

>> +*

>> +*  Copyright (c) 2015, Linaro Limited. All rights reserved.

>> +*

>> +*  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.

>> +*

>> +**/

>> +

>> +#ifndef __HOSTNAME_H__

>> +#define __HOSTNAME_H__

>> +

>> +extern EFI_GUID gEfiHostnameVariableGuid;

>> +

>> +#endif /* __HOSTNAME_H__ */

>> --

>> 1.9.1

>>

> _______________________________________________

> edk2-devel mailing list

> edk2-devel@lists.01.org

> https://lists.01.org/mailman/listinfo/edk2-devel

> 


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Ard Biesheuvel March 1, 2016, 11:54 a.m. UTC | #3
On 1 March 2016 at 12:51, Laszlo Ersek <lersek@redhat.com> wrote:
> On 03/01/16 12:41, Ard Biesheuvel wrote:

>> On 1 March 2016 at 12:34, Shivamurthy Shastri

>> <shivamurthy.shastri@linaro.org> wrote:

>>> Resolved below errors:

>>> 1. Variable 'gEfiHostnameVariableGuid' used, but not defined GUID.

>>> 2. File 'Hostname.h' is included, but it is not available in source.

>>>

>>

>> Interesting. I suppose this code could never be built from the

>> upstream source since it was merged? Nice.

>>

>> Anyway, since this GUID is used as a scope identifier for the EFI

>> variable holding the hostname, I don't think we need a brand new GUID

>> here. Either gEfiGlobalVariableGuid or gEfiCallerIdGuid (if the

>> variable is considered private to this module) should be sufficient.

>

> the gEfiGlobalVariableGuid namespace allows standardized variables only,

> IIRC

>


OK, I didn't realize that. In any case, I wonder how this is supposed
to work, since the scope GUID does not exist, and there is no code in
the tree that sets the variable L"Hostname" in any scope.

So please, let's figure out how this works in theory before papering
over more profound issues by defining missing GUIDs with random
values.
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Laszlo Ersek March 1, 2016, 12:19 p.m. UTC | #4
On 03/01/16 12:54, Ard Biesheuvel wrote:
> On 1 March 2016 at 12:51, Laszlo Ersek <lersek@redhat.com> wrote:

>> On 03/01/16 12:41, Ard Biesheuvel wrote:

>>> On 1 March 2016 at 12:34, Shivamurthy Shastri

>>> <shivamurthy.shastri@linaro.org> wrote:

>>>> Resolved below errors:

>>>> 1. Variable 'gEfiHostnameVariableGuid' used, but not defined GUID.

>>>> 2. File 'Hostname.h' is included, but it is not available in source.

>>>>

>>>

>>> Interesting. I suppose this code could never be built from the

>>> upstream source since it was merged? Nice.

>>>

>>> Anyway, since this GUID is used as a scope identifier for the EFI

>>> variable holding the hostname, I don't think we need a brand new GUID

>>> here. Either gEfiGlobalVariableGuid or gEfiCallerIdGuid (if the

>>> variable is considered private to this module) should be sufficient.

>>

>> the gEfiGlobalVariableGuid namespace allows standardized variables only,

>> IIRC

>>

> 

> OK, I didn't realize that. In any case, I wonder how this is supposed

> to work, since the scope GUID does not exist, and there is no code in

> the tree that sets the variable L"Hostname" in any scope.

> 

> So please, let's figure out how this works in theory before papering

> over more profound issues by defining missing GUIDs with random

> values.


Sure, my first choice is to avoid papering over things as well.

Can someone state the problem concisely?

Thanks
Laszlo

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox

Patch

diff --git a/EmbeddedPkg/EmbeddedPkg.dec b/EmbeddedPkg/EmbeddedPkg.dec
index cd0d96f..2617323 100644
--- a/EmbeddedPkg/EmbeddedPkg.dec
+++ b/EmbeddedPkg/EmbeddedPkg.dec
@@ -55,6 +55,8 @@ 
   # Include/Guid/FdtHob.h
   gFdtHobGuid   = { 0x16958446, 0x19B7, 0x480B, { 0xB0, 0x47, 0x74, 0x85, 0xAD, 0x3F, 0x71, 0x6D } }
   gFdtVariableGuid = { 0x25a4fd4a, 0x9703, 0x4ba9, { 0xa1, 0x90, 0xb7, 0xc8, 0x4e, 0xfb, 0x3e, 0x57 } }
+  # Include/Guid/Hostname.h
+  gEfiHostnameVariableGuid     = { 0xf1851fe8, 0x7d79, 0x43fb, { 0xae, 0x4c, 0x65, 0x7d, 0xd8, 0xd3, 0xc8, 0x80 } }
 
 [Protocols.common]
   gHardwareInterruptProtocolGuid =  { 0x2890B3EA, 0x053D, 0x1643, { 0xAD, 0x0C, 0xD6, 0x48, 0x08, 0xDA, 0x3F, 0xF1 } }
diff --git a/EmbeddedPkg/Include/Guid/Hostname.h b/EmbeddedPkg/Include/Guid/Hostname.h
new file mode 100644
index 0000000..6789d89
--- /dev/null
+++ b/EmbeddedPkg/Include/Guid/Hostname.h
@@ -0,0 +1,20 @@ 
+/** @file
+*
+*  Copyright (c) 2015, Linaro Limited. All rights reserved.
+*
+*  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.
+*
+**/
+
+#ifndef __HOSTNAME_H__
+#define __HOSTNAME_H__
+
+extern EFI_GUID gEfiHostnameVariableGuid;
+
+#endif /* __HOSTNAME_H__ */