]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellLevel2CommandsLib/Rm.c
Comment's added and fixed.
[mirror_edk2.git] / ShellPkg / Library / UefiShellLevel2CommandsLib / Rm.c
index bde710faf044f9be2a4b1df3728f71c2c581e24c..ea3792a3be1fb8a33b44c623643e507f244ee974 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for attrib shell level 2 function.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2011, 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
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -19,6 +19,14 @@ STATIC CONST SHELL_PARAM_ITEM ParamList[] = {
   {NULL, TypeMax}\r
   };\r
 \r
+/**\r
+  Determine if a directory has no files in it.\r
+\r
+  @param[in] FileHandle   The EFI_HANDLE to the directory.\r
+  \r
+  @retval TRUE  The directory has no files (or directories).\r
+  @retval FALSE The directory has at least 1 file or directory in it.\r
+**/\r
 BOOLEAN\r
 EFIAPI\r
 IsDirectoryEmpty (\r
@@ -45,6 +53,17 @@ IsDirectoryEmpty (
   return (RetVal);\r
 }\r
 \r
+/**\r
+  Delete a node and all nodes under it (including sub directories).\r
+\r
+  @param[in] Node   The node to start deleting with.\r
+  @param[in] Quiet  TRUE to print no messages.\r
+\r
+  @retval SHELL_SUCCESS       The operation was successful.\r
+  @retval SHELL_ACCESS_DENIED A file was read only.\r
+  @retval SHELL_ABORTED       The abort message was received.\r
+  @retval SHELL_DEVICE_ERROR  A device error occured reading this Node.\r
+**/\r
 SHELL_STATUS\r
 EFIAPI\r
 CascadeDelete(\r
@@ -126,7 +145,7 @@ CascadeDelete(
   }\r
 \r
   //\r
-  // We cant allow for the warning here!\r
+  // We cant allow for the warning here! (Dont use EFI_ERROR Macro).\r
   //\r
   if (Status != EFI_SUCCESS){\r
     ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_RM_LOG_DELETE_ERR), gShellLevel2HiiHandle, Status);\r
@@ -137,6 +156,13 @@ CascadeDelete(
   }\r
 }\r
 \r
+/**\r
+  Determins if a Node is a valid delete target.  Will prevent deleting the root directory.\r
+\r
+  @param[in] List       RESERVED.  Not used.\r
+  @param[in] Node       The node to analyze.\r
+  @param[in] Package    RESERVED.  Not used.\r
+**/\r
 BOOLEAN\r
 EFIAPI\r
 IsValidDeleteTarget(\r