public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2] BaseTools/VolInfo: Show encapsulation sections
@ 2022-07-19 12:29 Konstantin Aladyshev
  2022-07-25 16:08 ` Bob Feng
  2022-09-21  1:06 ` 回复: " gaoliming
  0 siblings, 2 replies; 3+ messages in thread
From: Konstantin Aladyshev @ 2022-07-19 12:29 UTC (permalink / raw)
  To: devel; +Cc: bob.c.feng, gaoliming, yuwei.chen, Konstantin Aladyshev

Currently there is no labels for start and end of the encapsulation
sections. Therefore it is not possible to see where the encapsulation
section ends and another section starts.
Add labels for start and end of encapsulation sections to fix the
issue.

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
---
 BaseTools/Source/C/VolInfo/VolInfo.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/BaseTools/Source/C/VolInfo/VolInfo.c b/BaseTools/Source/C/VolInfo/VolInfo.c
index c1f81f2dcb..ce1775f7fd 100644
--- a/BaseTools/Source/C/VolInfo/VolInfo.c
+++ b/BaseTools/Source/C/VolInfo/VolInfo.c
@@ -1903,7 +1903,9 @@ Returns:
         return EFI_SECTION_ERROR;
       }
 
+      printf ("/------------ Encapsulation section start -----------------\\\n");
       Status = ParseSection (UncompressedBuffer, UncompressedLength);
+      printf ("\\------------ Encapsulation section end -------------------/\n");
 
       if (CompressionType == EFI_STANDARD_COMPRESSION) {
         //
@@ -2022,6 +2024,7 @@ Returns:
           return EFI_SECTION_ERROR;
         }
 
+        printf ("/------------ Encapsulation section start -----------------\\\n");
         Status = ParseSection (
                   ToolOutputBuffer,
                   ToolOutputLength
@@ -2030,6 +2033,7 @@ Returns:
           Error (NULL, 0, 0003, "parse of decoded GUIDED section failed", NULL);
           return EFI_SECTION_ERROR;
         }
+        printf ("\\------------ Encapsulation section end -------------------/\n");
 
       //
       // Check for CRC32 sections which we can handle internally if needed.
@@ -2042,6 +2046,7 @@ Returns:
         //
         // CRC32 guided section
         //
+        printf ("/------------ Encapsulation section start -----------------\\\n");
         Status = ParseSection (
                   SectionBuffer + DataOffset,
                   BufferLength - DataOffset
@@ -2050,6 +2055,7 @@ Returns:
           Error (NULL, 0, 0003, "parse of CRC32 GUIDED section failed", NULL);
           return EFI_SECTION_ERROR;
         }
+        printf ("\\------------ Encapsulation section end -------------------/\n");
       } else {
         //
         // We don't know how to parse it now.
-- 
2.25.1


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

* Re: [PATCH v2] BaseTools/VolInfo: Show encapsulation sections
  2022-07-19 12:29 [PATCH v2] BaseTools/VolInfo: Show encapsulation sections Konstantin Aladyshev
@ 2022-07-25 16:08 ` Bob Feng
  2022-09-21  1:06 ` 回复: " gaoliming
  1 sibling, 0 replies; 3+ messages in thread
From: Bob Feng @ 2022-07-25 16:08 UTC (permalink / raw)
  To: Konstantin Aladyshev, devel@edk2.groups.io; +Cc: Gao, Liming, Chen, Christine

Reviewed-by: Bob Feng <bob.c.feng@intel.com>

-----Original Message-----
From: Konstantin Aladyshev <aladyshev22@gmail.com> 
Sent: Tuesday, July 19, 2022 8:29 PM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>; Konstantin Aladyshev <aladyshev22@gmail.com>
Subject: [PATCH v2] BaseTools/VolInfo: Show encapsulation sections

Currently there is no labels for start and end of the encapsulation sections. Therefore it is not possible to see where the encapsulation section ends and another section starts.
Add labels for start and end of encapsulation sections to fix the issue.

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
---
 BaseTools/Source/C/VolInfo/VolInfo.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/BaseTools/Source/C/VolInfo/VolInfo.c b/BaseTools/Source/C/VolInfo/VolInfo.c
index c1f81f2dcb..ce1775f7fd 100644
--- a/BaseTools/Source/C/VolInfo/VolInfo.c
+++ b/BaseTools/Source/C/VolInfo/VolInfo.c
@@ -1903,7 +1903,9 @@ Returns:
         return EFI_SECTION_ERROR;       } +      printf ("/------------ Encapsulation section start -----------------\\\n");       Status = ParseSection (UncompressedBuffer, UncompressedLength);+      printf ("\\------------ Encapsulation section end -------------------/\n");        if (CompressionType == EFI_STANDARD_COMPRESSION) {         //@@ -2022,6 +2024,7 @@ Returns:
           return EFI_SECTION_ERROR;         } +        printf ("/------------ Encapsulation section start -----------------\\\n");         Status = ParseSection (                   ToolOutputBuffer,                   ToolOutputLength@@ -2030,6 +2033,7 @@ Returns:
           Error (NULL, 0, 0003, "parse of decoded GUIDED section failed", NULL);           return EFI_SECTION_ERROR;         }+        printf ("\\------------ Encapsulation section end -------------------/\n");        //       // Check for CRC32 sections which we can handle internally if needed.@@ -2042,6 +2046,7 @@ Returns:
         //         // CRC32 guided section         //+        printf ("/------------ Encapsulation section start -----------------\\\n");         Status = ParseSection (                   SectionBuffer + DataOffset,                   BufferLength - DataOffset@@ -2050,6 +2055,7 @@ Returns:
           Error (NULL, 0, 0003, "parse of CRC32 GUIDED section failed", NULL);           return EFI_SECTION_ERROR;         }+        printf ("\\------------ Encapsulation section end -------------------/\n");       } else {         //         // We don't know how to parse it now.-- 
2.25.1


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

* 回复: [PATCH v2] BaseTools/VolInfo: Show encapsulation sections
  2022-07-19 12:29 [PATCH v2] BaseTools/VolInfo: Show encapsulation sections Konstantin Aladyshev
  2022-07-25 16:08 ` Bob Feng
@ 2022-09-21  1:06 ` gaoliming
  1 sibling, 0 replies; 3+ messages in thread
From: gaoliming @ 2022-09-21  1:06 UTC (permalink / raw)
  To: 'Konstantin Aladyshev', devel; +Cc: bob.c.feng, yuwei.chen

Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>

> -----邮件原件-----
> 发件人: Konstantin Aladyshev <aladyshev22@gmail.com>
> 发送时间: 2022年7月19日 20:29
> 收件人: devel@edk2.groups.io
> 抄送: bob.c.feng@intel.com; gaoliming@byosoft.com.cn;
> yuwei.chen@intel.com; Konstantin Aladyshev <aladyshev22@gmail.com>
> 主题: [PATCH v2] BaseTools/VolInfo: Show encapsulation sections
> 
> Currently there is no labels for start and end of the encapsulation
> sections. Therefore it is not possible to see where the encapsulation
> section ends and another section starts.
> Add labels for start and end of encapsulation sections to fix the
> issue.
> 
> Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
> ---
>  BaseTools/Source/C/VolInfo/VolInfo.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/BaseTools/Source/C/VolInfo/VolInfo.c
> b/BaseTools/Source/C/VolInfo/VolInfo.c
> index c1f81f2dcb..ce1775f7fd 100644
> --- a/BaseTools/Source/C/VolInfo/VolInfo.c
> +++ b/BaseTools/Source/C/VolInfo/VolInfo.c
> @@ -1903,7 +1903,9 @@ Returns:
>          return EFI_SECTION_ERROR;
> 
>        }
> 
> 
> 
> +      printf ("/------------ Encapsulation section start
-----------------\\\n");
> 
>        Status = ParseSection (UncompressedBuffer, UncompressedLength);
> 
> +      printf ("\\------------ Encapsulation section end
-------------------/\n");
> 
> 
> 
>        if (CompressionType == EFI_STANDARD_COMPRESSION) {
> 
>          //
> 
> @@ -2022,6 +2024,7 @@ Returns:
>            return EFI_SECTION_ERROR;
> 
>          }
> 
> 
> 
> +        printf ("/------------ Encapsulation section start
> -----------------\\\n");
> 
>          Status = ParseSection (
> 
>                    ToolOutputBuffer,
> 
>                    ToolOutputLength
> 
> @@ -2030,6 +2033,7 @@ Returns:
>            Error (NULL, 0, 0003, "parse of decoded GUIDED section failed",
> NULL);
> 
>            return EFI_SECTION_ERROR;
> 
>          }
> 
> +        printf ("\\------------ Encapsulation section end
> -------------------/\n");
> 
> 
> 
>        //
> 
>        // Check for CRC32 sections which we can handle internally if
> needed.
> 
> @@ -2042,6 +2046,7 @@ Returns:
>          //
> 
>          // CRC32 guided section
> 
>          //
> 
> +        printf ("/------------ Encapsulation section start
> -----------------\\\n");
> 
>          Status = ParseSection (
> 
>                    SectionBuffer + DataOffset,
> 
>                    BufferLength - DataOffset
> 
> @@ -2050,6 +2055,7 @@ Returns:
>            Error (NULL, 0, 0003, "parse of CRC32 GUIDED section failed",
> NULL);
> 
>            return EFI_SECTION_ERROR;
> 
>          }
> 
> +        printf ("\\------------ Encapsulation section end
> -------------------/\n");
> 
>        } else {
> 
>          //
> 
>          // We don't know how to parse it now.
> 
> --
> 2.25.1




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

end of thread, other threads:[~2022-09-21  1:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-19 12:29 [PATCH v2] BaseTools/VolInfo: Show encapsulation sections Konstantin Aladyshev
2022-07-25 16:08 ` Bob Feng
2022-09-21  1:06 ` 回复: " gaoliming

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