39 UINT64 FileAttributesToAdd;
40 UINT64 FileAttributesToRemove;
45 UINTN ParamNumberCount;
46 CONST CHAR16 *FileName;
65 if (EFI_ERROR (Status)) {
66 if ((Status == EFI_VOLUME_CORRUPTED) && (ProblemParam !=
NULL)) {
80 FileAttributesToAdd = 0;
81 FileAttributesToRemove = 0;
87 FileAttributesToAdd |= EFI_FILE_ARCHIVE;
91 FileAttributesToRemove |= EFI_FILE_ARCHIVE;
95 FileAttributesToAdd |= EFI_FILE_SYSTEM;
99 FileAttributesToRemove |= EFI_FILE_SYSTEM;
103 FileAttributesToAdd |= EFI_FILE_HIDDEN;
107 FileAttributesToRemove |= EFI_FILE_HIDDEN;
111 FileAttributesToAdd |= EFI_FILE_READ_ONLY;
115 FileAttributesToRemove |= EFI_FILE_READ_ONLY;
118 if ((FileAttributesToRemove == 0) && (FileAttributesToAdd == 0)) {
122 for ( ParamNumberCount = 1
129 if ((FileName ==
NULL) && (ParamNumberCount == 1)) {
130 FileName = (CHAR16 *)AllFiles;
131 }
else if (FileName ==
NULL) {
135 ASSERT (ListOfFiles ==
NULL);
137 if (EFI_ERROR (Status)) {
151 gShellLevel2HiiHandle,
168 if (EFI_ERROR (Status)) {
174 }
else if ((FileAttributesToRemove & FileAttributesToAdd) != 0) {
184 for ( ParamNumberCount = 1
191 if (FileName ==
NULL) {
195 if (ParamNumberCount == 1) {
211 ASSERT (ListOfFiles ==
NULL);
213 if (EFI_ERROR (Status)) {
234 if ((FileAttributesToRemove & EFI_FILE_READ_ONLY) == EFI_FILE_READ_ONLY) {
240 if (EFI_ERROR (Status)) {
256 if (EFI_ERROR (Status)) {
266 if (EFI_ERROR (Status)) {
284 return (ShellStatus);
SHELL_STATUS EFIAPI ShellCommandRunAttrib(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
BOOLEAN EFIAPI IsNull(IN CONST LIST_ENTRY *List, IN CONST LIST_ENTRY *Node)
LIST_ENTRY *EFIAPI GetNextNode(IN CONST LIST_ENTRY *List, IN CONST LIST_ENTRY *Node)
INTN EFIAPI StrCmp(IN CONST CHAR16 *FirstString, IN CONST CHAR16 *SecondString)
LIST_ENTRY *EFIAPI GetFirstNode(IN CONST LIST_ENTRY *List)
VOID EFIAPI FreePool(IN VOID *Buffer)
#define ASSERT_EFI_ERROR(StatusParameter)
@ SHELL_INVALID_PARAMETER
EFI_FILE_INFO * FileInfo(IN EFI_FILE_HANDLE FHand)
EFI_STATUS EFIAPI ShellSetFileInfo(IN SHELL_FILE_HANDLE FileHandle, IN EFI_FILE_INFO *FileInfo)
BOOLEAN EFIAPI ShellGetExecutionBreakFlag(VOID)
EFI_STATUS EFIAPI ShellCloseFileMetaArg(IN OUT EFI_SHELL_FILE_INFO **ListHead)
#define ShellCommandLineParse(CheckList, CheckPackage, ProblemParam, AutoPageBreak)
Make it easy to upgrade from older versions of the shell library.
EFI_STATUS EFIAPI ShellPrintHiiEx(IN INT32 Col OPTIONAL, IN INT32 Row OPTIONAL, IN CONST CHAR8 *Language OPTIONAL, IN CONST EFI_STRING_ID HiiFormatStringId, IN CONST EFI_HII_HANDLE HiiFormatHandle,...)
BOOLEAN EFIAPI ShellCommandLineGetFlag(IN CONST LIST_ENTRY *CONST CheckPackage, IN CONST CHAR16 *CONST KeyString)
@ TypeFlag
A flag that is present or not present only (IE "-a").
EFI_STATUS EFIAPI ShellOpenFileMetaArg(IN CHAR16 *Arg, IN UINT64 OpenMode, IN OUT EFI_SHELL_FILE_INFO **ListHead)
VOID EFIAPI ShellCommandLineFreeVarList(IN LIST_ENTRY *CheckPackage)
EFI_STATUS EFIAPI ShellInitialize(VOID)
CONST CHAR16 *EFIAPI ShellCommandLineGetRawValue(IN CONST LIST_ENTRY *CONST CheckPackage, IN UINTN Position)
LIST_ENTRY Link
Linked list members.
SHELL_FILE_HANDLE Handle
Handle for interacting with the opened file or NULL if closed.
EFI_FILE_INFO * Info
Pointer to the FileInfo struct for this file or NULL.
CONST CHAR16 * FileName
name of this file.