diff options
Diffstat (limited to 'ShellPkg/Library')
-rw-r--r-- | ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c index da2b1ac..8b97926 100644 --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c @@ -489,6 +489,20 @@ PrintLsOutput( PrintSfoVolumeInfoTableEntry(ListHead);
}
+ if (!Sfo) {
+ //
+ // Sort the file list by FileName, stably.
+ //
+ // If the call below fails, then the EFI_SHELL_FILE_INFO list anchored to
+ // ListHead will not be changed in any way.
+ //
+ ShellSortFileList (
+ &ListHead,
+ NULL, // Duplicates
+ ShellSortFileListByFileName
+ );
+ }
+
for ( Node = (EFI_SHELL_FILE_INFO *)GetFirstNode(&ListHead->Link), LongestPath = 0
; !IsNull(&ListHead->Link, &Node->Link)
; Node = (EFI_SHELL_FILE_INFO *)GetNextNode(&ListHead->Link, &Node->Link)
|