<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/ShellPkg/Library, branch edk2_master</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=edk2_master</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=edk2_master'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2025-12-04T08:43:02+00:00</updated>
<entry>
<title>ShellPkg/AcpiView: Fix unused variable warnings in RimtParser</title>
<updated>2025-12-04T08:43:02+00:00</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ardb@kernel.org</email>
</author>
<published>2025-11-26T12:33:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=3bc03ff552c81259cb838cd286a5a7c074c1aaba'/>
<id>urn:sha1:3bc03ff552c81259cb838cd286a5a7c074c1aaba</id>
<content type='text'>
Clang complains about unused variables:

ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rimt/RimtParser.c:21:60: error: variable 'mRimtNodeHeader' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
   21 | STATIC EFI_ACPI_6_6_RIMT_NODE_HEADER_STRUCTURE             mRimtNodeHeader;
      |                                                            ^~~~~~~~~~~~~~~
ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rimt/RimtParser.c:25:60: error: variable 'mRimtIdMappingNode' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
   25 | STATIC EFI_ACPI_6_6_RIMT_ID_MAPPING_STRUCTURE              mRimtIdMappingNode;
      |                                                            ^~~~~~~~~~~~~~~~~~
   28 | STATIC EFI_ACPI_6_6_RIMT_PCIE_ROOT_COMPLEX_NODE_STRUCTURE  mRimtPcieRootComplexNode;
      |                                                            ^~~~~~~~~~~~~~~~~~~~~~~~
ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rimt/RimtParser.c:29:60: error: variable 'mRimtIommuNode' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
   29 | STATIC EFI_ACPI_6_6_RIMT_IOMMU_NODE_STRUCTURE              mRimtIommuNode;
      |                                                            ^~~~~~~~~~~~~~
4 errors generated.

This is because these variables are only used to take the size of their
fields using the sizeof() operator, which does not support type names
directly.

So create a helper macro SIZE_OF_T () that provides the functionality we
need, and drop the unused variables.

Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
</content>
</entry>
<entry>
<title>ShellPkg/For: Remove redundant null/empty checks on ArgSetWalker</title>
<updated>2025-12-03T17:41:35+00:00</updated>
<author>
<name>Mingjie Shen</name>
<email>shen497@purdue.edu</email>
</author>
<published>2025-11-02T05:52:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=2b47c81fe6f723100ab2fa893a74b429fe8bbe7e'/>
<id>urn:sha1:2b47c81fe6f723100ab2fa893a74b429fe8bbe7e</id>
<content type='text'>
Fix CodeQL cpp/redundant-null-check-simple warning in
ShellPkg/Library/UefiShellLevel1CommandsLib/For.c at line 571 by
removing redundant null and empty-string checks on ArgSetWalker. The
outer guard at line 570 ensures that ArgSetWalker is non-NULL and
non-empty, so the inner condition only needs
ShellIsValidForNumber(ArgSetWalker).

Signed-off-by: Mingjie Shen &lt;shen497@purdue.edu&gt;
</content>
</entry>
<entry>
<title>ShellPkg/Mv: Harden and optimize trailing-slash trimming</title>
<updated>2025-12-03T17:41:35+00:00</updated>
<author>
<name>Mingjie Shen</name>
<email>shen497@purdue.edu</email>
</author>
<published>2025-10-31T06:31:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=ee0084a071b9836cbea07c469483b5f0c10d6abf'/>
<id>urn:sha1:ee0084a071b9836cbea07c469483b5f0c10d6abf</id>
<content type='text'>
- Remove redundant null check in IsValidMove() per CodeQL
  cpp/redundant-null-check-simple. Specifically, drop the
  "DestPathWalker != NULL" condition from the trimming loop.
  Rationale: "DestPathCopy" is allocated at line 181 and checked for
  NULL at lines 182–183; "DestPathWalker" is initialized from
  "DestPathCopy" at line 186, so it cannot be NULL.
- Cache length once in IsValidMove() and ValidateAndMoveFiles() so the
  trimming loop avoids repeated StrLen() calls.
- Guard the zero-length case before indexing the last character to
  prevent out-of-bounds access.

Signed-off-by: Mingjie Shen &lt;shen497@purdue.edu&gt;
</content>
</entry>
<entry>
<title>ShellPkg/UefiShellLevel2: Fix CodeQl issues</title>
<updated>2025-12-02T08:00:53+00:00</updated>
<author>
<name>Pierre Gondois</name>
<email>pierre.gondois@arm.com</email>
</author>
<published>2025-12-01T14:00:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=19c62fd3acd869c36dc514b5facb1ad797c366ae'/>
<id>urn:sha1:19c62fd3acd869c36dc514b5facb1ad797c366ae</id>
<content type='text'>
Fix CodeQl issue triggered by the previous patches.
- Rm: FileList might be NULL

Signed-off-by: Pierre Gondois &lt;pierre.gondois@arm.com&gt;
</content>
</entry>
<entry>
<title>ShellPkg/UefiShellLevel2/Ls: Remove ShellStatus check in MainCmdLs()</title>
<updated>2025-12-02T08:00:53+00:00</updated>
<author>
<name>Pierre Gondois</name>
<email>pierre.gondois@arm.com</email>
</author>
<published>2025-12-01T16:45:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=95476665c4fcb41a7eb43542e375830ada04d636'/>
<id>urn:sha1:95476665c4fcb41a7eb43542e375830ada04d636</id>
<content type='text'>
Remove a check against ShellStatus in MainCmdLs() as there are
two consecutive checks without any modification of ShellStatus.

Suggested-by: Leif Lindholm &lt;leif.lindholm@oss.qualcomm.com&gt;
Signed-off-by: Pierre Gondois &lt;pierre.gondois@arm.com&gt;
</content>
</entry>
<entry>
<title>ShellPkg/UefiShellLevel2/Ls: Bail out early in MainCmdLs()</title>
<updated>2025-12-02T08:00:53+00:00</updated>
<author>
<name>Pierre Gondois</name>
<email>pierre.gondois@arm.com</email>
</author>
<published>2025-12-01T15:33:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=8e822d5d262b63a17315f1156e2277b3837b59bf'/>
<id>urn:sha1:8e822d5d262b63a17315f1156e2277b3837b59bf</id>
<content type='text'>
If RootPath is NULL, PrintLsOutput() will return an error code
of SHELL_OUT_OF_RESOURCES and not print anything:
PrintLsOutput()
\-StrnCatGrow()
  if (Source == NULL) {
    return (*Destination);
  }

Remove paths where FullPath ends up being NULL and bail out
early.

Signed-off-by: Pierre Gondois &lt;pierre.gondois@arm.com&gt;
</content>
</entry>
<entry>
<title>ShellPkg/UefiShellLevel2/Ls: Flatten MainCmdLs()</title>
<updated>2025-12-02T08:00:53+00:00</updated>
<author>
<name>Pierre Gondois</name>
<email>pierre.gondois@arm.com</email>
</author>
<published>2025-12-01T15:22:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=0b982813c756569be8f54f177bde090b76e9638e'/>
<id>urn:sha1:0b982813c756569be8f54f177bde090b76e9638e</id>
<content type='text'>
Remove some of the success handling conditions to flatten
the MainCmdLs() function.

No functional change should be induced by this patch.

Signed-off-by: Pierre Gondois &lt;pierre.gondois@arm.com&gt;
</content>
</entry>
<entry>
<title>ShellPkg/UefiShellLevel2: Lower indentation level in MainCmdXXX()</title>
<updated>2025-12-02T08:00:53+00:00</updated>
<author>
<name>Pierre Gondois</name>
<email>pierre.gondois@arm.com</email>
</author>
<published>2025-11-27T20:28:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=5b1530e5adb3b24224a9a3a92b1dab6395d2dc58'/>
<id>urn:sha1:5b1530e5adb3b24224a9a3a92b1dab6395d2dc58</id>
<content type='text'>
This patch aims to help breaking down the long function present in
the ShellPkg and reduce complexity/nested code and conditions.

Lower the indentation level in the newly created MainCmdXXX()
functions.

No functional change should be induced by this patch.

Signed-off-by: Pierre Gondois &lt;pierre.gondois@arm.com&gt;
</content>
</entry>
<entry>
<title>ShellPkg/UefiShellLevel2: Extract MainCmdXXX() function</title>
<updated>2025-12-02T08:00:53+00:00</updated>
<author>
<name>Pierre Gondois</name>
<email>pierre.gondois@arm.com</email>
</author>
<published>2025-09-20T18:06:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=531b0aa00211656a738ee9612112b0dbce2658e1'/>
<id>urn:sha1:531b0aa00211656a738ee9612112b0dbce2658e1</id>
<content type='text'>
This patch aims to help breaking down the long function present in
the ShellPkg and reduce complexity/nested code and conditions.

Extract a MainCmdXXX() function for each shell command.
This command contains the possible operations the command aims
to operate. The ShellCommandRunXXX() function from which it
is extracted is only responsible of:
- initializing the shell/command environment
- parsing the command parameter and creating a Package
- freeing the Package

No functional change should be induced by this patch.

Signed-off-by: Pierre Gondois &lt;pierre.gondois@arm.com&gt;
</content>
</entry>
<entry>
<title>ShellPkg/UefiShellLevel2: Return if ShellCommandLineParse() failed</title>
<updated>2025-12-02T08:00:53+00:00</updated>
<author>
<name>Pierre Gondois</name>
<email>pierre.gondois@arm.com</email>
</author>
<published>2025-09-20T17:56:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=ce88903374a9be9cbc15ee80b189cef5dc2e90d8'/>
<id>urn:sha1:ce88903374a9be9cbc15ee80b189cef5dc2e90d8</id>
<content type='text'>
This patch aims to help breaking down the long function present in
the ShellPkg and reduce complexity/nested code and conditions.

Return directly if ShellCommandLineParse() returned an error Status.
In such case, the "Package" that should be allocated by
ShellCommandLineParse() is already freed in:
ShellCommandLineParse()
\-ShellCommandLineParseEx()
  \-InternalCommandLineParse()
so there is no need to free it with ShellCommandLineFreeVarList().

Note:
Cd:
Return directly if ShellCommandLineParse() returned an error
Status. The initial code was ignoring the error status.

Cp:
Only check for ShellGetExecutionBreakFlag() if
ShellCommandLineParse() returned successfully. If the command
line failed to be parsed, there should be no need to check for
the execution break flag.

No functional change should be induced by this patch.

Signed-off-by: Pierre Gondois &lt;pierre.gondois@arm.com&gt;
</content>
</entry>
</feed>
