]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Include/Protocol/EfiShell.h
comment repairs.
[mirror_edk2.git] / ShellPkg / Include / Protocol / EfiShell.h
index 11ee58a75ce21ec0c5152e3dfe32d052c448ecc9..92bb03fa5e6d9534fb66032c14633ad9deb5308d 100644 (file)
 // replaced EFI_LIST_ENTRY with LIST_ENTRY for simplicity.\r
 // they are identical outside of the name.\r
 typedef struct {\r
-  LIST_ENTRY Link;          ///< Linked list members\r
-  EFI_STATUS Status;        ///< Status of opening the file.  Valid only if Handle != NULL.\r
-  CONST CHAR16 *FullName;   ///< Fully qualified filename.\r
-  CONST CHAR16 *FileName;   ///< name of this file.\r
-  EFI_FILE_HANDLE Handle;   ///< Handle for interacting with the opened file or NULL if closed.\r
-  EFI_FILE_INFO *Info;      ///< Pointer to the FileInfo struct for this file or NULL.\r
+  LIST_ENTRY      Link;       ///< Linked list members.\r
+  EFI_STATUS      Status;     ///< Status of opening the file.  Valid only if Handle != NULL.\r
+  CONST CHAR16    *FullName;  ///< Fully qualified filename.\r
+  CONST CHAR16    *FileName;  ///< name of this file.\r
+  EFI_FILE_HANDLE Handle;     ///< Handle for interacting with the opened file or NULL if closed.\r
+  EFI_FILE_INFO   *Info;      ///< Pointer to the FileInfo struct for this file or NULL.\r
 } EFI_SHELL_FILE_INFO;\r
+\r
 /**\r
   Returns whether any script files are currently being processed.\r
 \r
@@ -53,9 +54,9 @@ BOOLEAN
   flushed to the device, and the file is closed. In all cases, the handle is \r
   closed.\r
 \r
-  @param[in] FileHandle             The file handle to be closed\r
+  @param[in] FileHandle         The file handle to be closed\r
 \r
-  @retval EFI_SUCCESS           the file closed sucessfully\r
+  @retval EFI_SUCCESS           The file closed sucessfully.\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -77,27 +78,27 @@ EFI_STATUS
   shell environment variable with the specified name. If the shell environment variable\r
   already exists and is non-volatile then EFI_INVALID_PARAMETER is returned.\r
 \r
-  @param[in] FileName       Pointer to null-terminated file path\r
-  @param[in] FileAttribs    The new file's attrbiutes.  the different attributes are\r
-                            described in EFI_FILE_PROTOCOL.Open().\r
-  @param[out] FileHandle    On return, points to the created file handle or directory's handle\r
+  @param[in] FileName           Pointer to null-terminated file path.\r
+  @param[in] FileAttribs        The new file's attrbiutes.  the different attributes are\r
+                                described in EFI_FILE_PROTOCOL.Open().\r
+  @param[out] FileHandle        On return, points to the created file handle or directory's handle\r
 \r
-  @retval EFI_SUCCESS       The file was opened.  FileHandle points to the new file's handle.\r
+  @retval EFI_SUCCESS           The file was opened.  FileHandle points to the new file's handle.\r
   @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.\r
-  @retval EFI_UNSUPPORTED   could not open the file path\r
-  @retval EFI_NOT_FOUND     The specified file could not be found on the device, or could not\r
-                            file the file system on the device.\r
-  @retval EFI_NO_MEDIA      the device has no medium.\r
-  @retval EFI_MEDIA_CHANGED The device has a different medium in it or the medium is no\r
-                            longer supported.\r
-  @retval EFI_DEVICE_ERROR The device reported an error or can't get the file path according\r
-                            the DirName.\r
-  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.\r
-  @retval EFI_WRITE_PROTECTED An attempt was made to create a file, or open a file for write\r
-                            when the media is write-protected.\r
-  @retval EFI_ACCESS_DENIED The service denied access to the file.\r
-  @retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the file.\r
-  @retval EFI_VOLUME_FULL   The volume is full.\r
+  @retval EFI_UNSUPPORTED       could not open the file path\r
+  @retval EFI_NOT_FOUND         The specified file could not be found on the device, or could not\r
+                                file the file system on the device.\r
+  @retval EFI_NO_MEDIA          The device has no medium.\r
+  @retval EFI_MEDIA_CHANGED     The device has a different medium in it or the medium is no\r
+                                longer supported.\r
+  @retval EFI_DEVICE_ERROR      The device reported an error or can't get the file path according\r
+                                the DirName.\r
+  @retval EFI_VOLUME_CORRUPTED  The file system structures are corrupted.\r
+  @retval EFI_WRITE_PROTECTED   An attempt was made to create a file, or open a file for write\r
+                                when the media is write-protected.\r
+  @retval EFI_ACCESS_DENIED     The service denied access to the file.\r
+  @retval EFI_OUT_OF_RESOURCES  Not enough resources were available to open the file.\r
+  @retval EFI_VOLUME_FULL       The volume is full.\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -116,7 +117,7 @@ EFI_STATUS
 \r
   @param[in] FileHandle           The file handle to delete.\r
 \r
-  @retval EFI_SUCCESS         The file was closed and deleted, and the handle was closed.\r
+  @retval EFI_SUCCESS             The file was closed and deleted, and the handle was closed.\r
   @retval EFI_WARN_DELETE_FAILURE The handle was closed but the file was not deleted.\r
 **/\r
 typedef\r
@@ -216,9 +217,9 @@ EFI_STATUS
 \r
   @retval EFI_SUCCESS           Files found.\r
   @retval EFI_NOT_FOUND         No files found.\r
-  @retval EFI_NO_MEDIA          The device has no media\r
-  @retval EFI_DEVICE_ERROR      The device reported an error\r
-  @retval EFI_VOLUME_CORRUPTED  The file system structures are corrupted\r
+  @retval EFI_NO_MEDIA          The device has no media.\r
+  @retval EFI_DEVICE_ERROR      The device reported an error.\r
+  @retval EFI_VOLUME_CORRUPTED  The file system structures are corrupted.\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -247,11 +248,11 @@ OUT EFI_SHELL_FILE_INFO **FileList
 );\r
 \r
 /**\r
-  Flushes data back to a device\r
+  Flushes data back to a device.\r
   \r
   This function flushes all modified data associated with a file to a device.\r
 \r
-  @param[in] FileHandle             The handle of the file to flush\r
+  @param[in] FileHandle         The handle of the file to flush\r
 \r
   @retval EFI_SUCCESS           The data was flushed.\r
   @retval EFI_NO_MEDIA          The device has no medium.\r
@@ -273,7 +274,7 @@ EFI_STATUS
   This function cleans up the file list and any related data structures. It has no\r
   impact on the files themselves.\r
 \r
-  @param[in] FileList               The file list to free. Type EFI_SHELL_FILE_INFO is \r
+  @param[in] FileList           The file list to free. Type EFI_SHELL_FILE_INFO is \r
                                 defined in OpenFileList()\r
 \r
   @retval EFI_SUCCESS           Free the file list successfully.\r
@@ -292,7 +293,7 @@ EFI_STATUS
   FileSystemMapping. In both cases, the returned name includes the file system\r
   mapping (i.e. fs0:\current-dir).\r
 \r
-  @param[in] FileSystemMapping      A pointer to the file system mapping. If NULL, \r
+  @param[in] FileSystemMapping  A pointer to the file system mapping. If NULL, \r
                                 then the current working directory is returned.\r
   \r
   @retval !=NULL                The current directory.\r
@@ -307,6 +308,7 @@ CONST CHAR16 *
 typedef UINT32 EFI_SHELL_DEVICE_NAME_FLAGS;\r
 #define EFI_DEVICE_NAME_USE_COMPONENT_NAME  0x00000001\r
 #define EFI_DEVICE_NAME_USE_DEVICE_PATH     0x00000002\r
+\r
 /**\r
   Gets the name of the device specified by the device handle.\r
 \r
@@ -328,7 +330,7 @@ typedef UINT32 EFI_SHELL_DEVICE_NAME_FLAGS;
   @param[in] Flags              Determines the possible sources of component names. \r
   @param[in] Language           A pointer to the language specified for the device \r
                                 name, in the same format as described in the UEFI \r
-                                specification, Appendix M \r
+                                specification, Appendix M.\r
   @param[out] BestDeviceName    On return, points to the callee-allocated null-\r
                                 terminated name of the device. If no device name \r
                                 could be found, points to NULL. The name must be \r
@@ -371,9 +373,9 @@ CONST EFI_DEVICE_PATH_PROTOCOL *
   This function converts a file system style name to a device path, by replacing any\r
   mapping references to the associated device path.\r
 \r
-  @param[in] Path                   the pointer to the path\r
+  @param[in] Path               The pointer to the path.\r
 \r
-  @return all                   The pointer of the file path. The file path is callee \r
+  @return                       The pointer of the file path. The file path is callee \r
                                 allocated and should be freed by the caller.\r
 **/\r
 typedef\r
@@ -393,7 +395,7 @@ EFI_DEVICE_PATH_PROTOCOL *
   If Name is NULL than a list of all environment variable names is returned.  Each a \r
   NULL terminated string with a double NULL terminating the list.\r
 \r
-  @param[in] Name                   A pointer to the environment variable name.  If \r
+  @param[in] Name               A pointer to the environment variable name.  If \r
                                 Name is NULL, then the function will return all \r
                                 of the defined shell environment variables.  In \r
                                 the case where multiple environment variables are \r
@@ -419,7 +421,7 @@ CONST CHAR16 *
   This function allocates a buffer to store the file's information. It's the caller's\r
   responsibility to free the buffer.\r
 \r
-  @param[in] FileHandle             A File Handle\r
+  @param[in] FileHandle         A File Handle.\r
 \r
   @return !=NULL                Cannot get the file info.\r
   @return NULL                  A pointer to a buffer with file information.\r
@@ -437,7 +439,7 @@ EFI_FILE_INFO *
   the device path with the file-system mapping. If there are more than one application\r
   file system mappings, the one that most closely matches Path will be used.\r
 \r
-  @param[in] Path                   The pointer to the device path\r
+  @param[in] Path               The pointer to the device path\r
 \r
   @return all                   The pointer of the null-terminated file path. The path \r
                                 is callee-allocated and should be freed by the caller.\r
@@ -449,14 +451,14 @@ CHAR16 *
   );\r
 \r
 /**\r
-  Gets a file's current position\r
+  Gets a file's current position.\r
 \r
   This function returns the current file position for the file handle. For directories, the\r
   current file position has no meaning outside of the file system driver and as such, the\r
   operation is not supported.\r
 \r
   @param[in] FileHandle         The file handle on which to get the current position.\r
-  @paramp[out] Position         Byte position from the start of the file\r
+  @paramp[out] Position         Byte position from the start of the file.\r
 \r
   @retval EFI_SUCCESS           Data was accessed.\r
   @retval EFI_UNSUPPORTED       The request is not valid on open directories.\r
@@ -508,7 +510,7 @@ EFI_STATUS
   @retval EFI_SUCCESS           The help text was returned.\r
   @retval EFI_OUT_OF_RESOURCES  The necessary buffer could not be allocated to hold the \r
                                 returned help text.\r
-  @retval EFI_INVALID_PARAMETER HelpText is NULL\r
+  @retval EFI_INVALID_PARAMETER HelpText is NULL.\r
   @retval EFI_NOT_FOUND         There is no help text available for Command.\r
 **/\r
 typedef\r
@@ -538,7 +540,7 @@ EFI_STATUS
                                 portion of the device path after the mapping.\r
 \r
   @retval NULL                  No mapping was found.\r
-  @return !=NULL                Pointer to null-terminated mapping. The buffer \r
+  @retval !=NULL                Pointer to null-terminated mapping. The buffer \r
                                 is callee allocated and should be freed by the caller.\r
 **/\r
 typedef\r
@@ -552,8 +554,8 @@ CONST CHAR16 *
 \r
   User can use this function to determine current page break mode.\r
 \r
-  @retval TRUE                  The page break output mode is enabled\r
-  @retval FALSE                 The page break output mode is disabled\r
+  @retval TRUE                  The page break output mode is enabled.\r
+  @retval FALSE                 The page break output mode is disabled.\r
 **/\r
 typedef\r
 BOOLEAN\r
@@ -648,7 +650,7 @@ EFI_STATUS
   @param[in,out] FileList       Points to the start of a list of files opened.\r
 \r
   @retval EFI_SUCCESS           Create the file list successfully.\r
-  @return Others                Can't create the file list.\r
+  @return                       Can't create the file list.\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -672,7 +674,7 @@ EFI_STATUS
   @retval EFI_NOT_FOUND         EFI_SIMPLE_FILE_SYSTEM could not be found or the root directory\r
                                 could not be opened.\r
   @retval EFI_VOLUME_CORRUPTED  The data structures in the volume were corrupted.\r
-  @retval EFI_DEVICE_ERROR      The device had an error\r
+  @retval EFI_DEVICE_ERROR      The device had an error.\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -682,7 +684,7 @@ EFI_STATUS
   );\r
 \r
 /**\r
-  Opens the root directory of a device on a handle\r
+  Opens the root directory of a device on a handle.\r
 \r
   This function opens the root directory of a device and returns a file handle to it.\r
 \r
@@ -694,7 +696,7 @@ EFI_STATUS
   @retval EFI_NOT_FOUND         EFI_SIMPLE_FILE_SYSTEM could not be found or the root directory\r
                                 could not be opened.\r
   @retval EFI_VOLUME_CORRUPTED  The data structures in the volume were corrupted.\r
-  @retval EFI_DEVICE_ERROR      The device had an error\r
+  @retval EFI_DEVICE_ERROR      The device had an error.\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -712,15 +714,15 @@ EFI_STATUS
   current position is increased by the number of bytes returned.\r
   If FileHandle is a directory, then an error is returned.\r
 \r
-  @param[in] FileHandle         The opened file handle for read\r
+  @param[in] FileHandle         The opened file handle for read.\r
   @param[in] ReadSize           On input, the size of Buffer, in bytes. On output, the amount of data read.\r
   @param[in,out] Buffer         The buffer in which data is read.\r
 \r
   @retval EFI_SUCCESS           Data was read.\r
-  @retval EFI_NO_MEDIA          The device has no media\r
-  @retval EFI_DEVICE_ERROR      The device reported an error\r
-  @retval EFI_VOLUME_CORRUPTED  The file system structures are corrupted\r
-  @retval EFI_BUFFER_TO_SMALL   Buffer is too small. ReadSize contains required size\r
+  @retval EFI_NO_MEDIA          The device has no media.\r
+  @retval EFI_DEVICE_ERROR      The device reported an error.\r
+  @retval EFI_VOLUME_CORRUPTED  The file system structures are corrupted.\r
+  @retval EFI_BUFFER_TO_SMALL   Buffer is too small. ReadSize contains required size.\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -733,8 +735,6 @@ EFI_STATUS
 /**\r
   Deletes the duplicate file names files in the given file list.\r
 \r
-  This function deletes the reduplicate files in the given file list.\r
-\r
   @param[in] FileList           A pointer to the first entry in the file list.\r
 \r
   @retval EFI_SUCCESS           Always success.\r
@@ -784,15 +784,15 @@ EFI_STATUS
   @param[in] Alias              Points to the null-terminated shell alias. \r
                                 If this parameter is NULL, then all \r
                                 aliases will be returned in ReturnedData.\r
-  @param[out] Volatile          upon return of a single command if TRUE indicates\r
+  @param[out] Volatile          Upon return of a single command if TRUE indicates\r
                                 this is stored in a volatile fashion.  FALSE otherwise.\r
   @return                              If Alias is not NULL, it will return a pointer to \r
                                 the null-terminated command for that alias. \r
                                 If Alias is NULL, ReturnedData points to a \91;\92 \r
                                 delimited list of alias (e.g. \r
                                 ReturnedData = \93dir;del;copy;mfp\94) that is null-terminated.  \r
-  @retval NULL                  an error ocurred\r
-  @retval NULL                  Alias was not a valid Alias\r
+  @retval NULL                  an error ocurred.\r
+  @retval NULL                  Alias was not a valid Alias.\r
 **/\r
 typedef \r
 CONST CHAR16 *\r
@@ -866,8 +866,8 @@ EFI_STATUS
 \r
   This function changes file information.\r
 \r
-  @param[in] FileHandle             A file handle\r
-  @param[in] FileInfo               Points to new file information.\r
+  @param[in] FileHandle         A file handle\r
+  @param[in] FileInfo           Points to new file information.\r
 \r
   @retval EFI_SUCCESS           The information was set.\r
   @retval EFI_NO_MEDIA          The device has no medium.\r
@@ -886,7 +886,7 @@ EFI_STATUS
   );\r
 \r
 /**\r
-  Sets a file's current position\r
+  Sets a file's current position.\r
 \r
   This function sets the current file position for the handle to the position supplied. With\r
   the exception of seeking to position 0xFFFFFFFFFFFFFFFF, only absolute positioning is\r
@@ -894,8 +894,8 @@ EFI_STATUS
   grow the file). Seeking to position 0xFFFFFFFFFFFFFFFF causes the current position\r
   to be set to the end of the file.\r
 \r
-  @param[in] FileHandle             The file handle on which requested position will be set.\r
-  @param[in] Position               Byte position from the start of the file\r
+  @param[in] FileHandle         The file handle on which requested position will be set.\r
+  @param[in] Position           Byte position from the start of the file.\r
 \r
   @retval EFI_SUCCESS           Data was written.\r
   @retval EFI_UNSUPPORTED       The seek request for nonzero is not valid on open directories.\r
@@ -910,9 +910,9 @@ EFI_STATUS
 /**\r
   This function creates a mapping for a device path.\r
 \r
-  @param[in] DevicePath             Points to the device path. If this is NULL and Mapping points to a valid mapping,\r
+  @param[in] DevicePath         Points to the device path. If this is NULL and Mapping points to a valid mapping,\r
                                 then the mapping will be deleted.\r
-  @param[in] Mapping                Points to the null-terminated mapping for the device path.\r
+  @param[in] Mapping            Points to the null-terminated mapping for the device path.\r
 \r
   @retval EFI_SUCCESS           Mapping created or deleted successfully.\r
   @retval EFI_NO_MAPPING        There is no handle that corresponds exactly to DevicePath. See the\r
@@ -941,14 +941,14 @@ EFI_STATUS
   @param[in,out] BufferSize         On input, size of Buffer.\r
   @param[in] Buffer                 The buffer in which data to write.\r
 \r
-  @retval EFI_SUCCESS Data was written.\r
-  @retval EFI_UNSUPPORTED Writes to open directory are not supported\r
-  @retval EFI_NO_MEDIA The device has no media\r
-  @retval EFI_DEVICE_ERROR The device reported an error\r
-  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted\r
-  @retval EFI_WRITE_PROTECTED The device is write-protected\r
-  @retval EFI_ACCESS_DENIED The file was open for read only\r
-  @retval EFI_VOLUME_FULL The volume is full\r
+  @retval EFI_SUCCESS               Data was written.\r
+  @retval EFI_UNSUPPORTED           Writes to open directory are not supported.\r
+  @retval EFI_NO_MEDIA              The device has no media.\r
+  @retval EFI_DEVICE_ERROR          The device reported an error.\r
+  @retval EFI_VOLUME_CORRUPTED      The file system structures are corrupted.\r
+  @retval EFI_WRITE_PROTECTED       The device is write-protected.\r
+  @retval EFI_ACCESS_DENIED         The file was open for read only.\r
+  @retval EFI_VOLUME_FULL           The volume is full.\r
 **/\r
 typedef\r
 EFI_STATUS\r