/** @file\r
Main file for ls shell level 2 function.\r
\r
- Copyright (c) 2013 Hewlett-Packard Development Company, L.P.\r
+ Copyright (c) 2013 - 2014, Hewlett-Packard Development Company, L.P.<BR>\r
Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
; !IsNull(&ListHead->Link, &Node->Link)\r
; Node = (EFI_SHELL_FILE_INFO *)GetNextNode(&ListHead->Link, &Node->Link)\r
){\r
+ if (ShellGetExecutionBreakFlag ()) {\r
+ ShellStatus = SHELL_ABORTED;\r
+ break;\r
+ }\r
ASSERT(Node != NULL);\r
if (LongestPath < StrSize(Node->FullName)) {\r
LongestPath = StrSize(Node->FullName);\r
HeaderPrinted = TRUE;\r
}\r
\r
- if (!Sfo) {\r
+ if (!Sfo && ShellStatus != SHELL_ABORTED) {\r
PrintNonSfoFooter(FileCount, FileSize, DirCount);\r
}\r
}\r
\r
- if (Rec) {\r
+ if (Rec && ShellStatus != SHELL_ABORTED) {\r
//\r
// Re-Open all the files under the starting path for directories that didnt necessarily match our file filter\r
//\r
&FoundOne,\r
Count,\r
TimeZone);\r
+ \r
+ //\r
+ // Since it's running recursively, we have to break immediately when returned SHELL_ABORTED\r
+ //\r
+ if (ShellStatus == SHELL_ABORTED) {\r
+ break;\r
+ }\r
}\r
}\r
}\r