]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Include/Protocol/EfiShell.h
Updating with new functions and adding "C" style entrypoint library with example...
[mirror_edk2.git] / ShellPkg / Include / Protocol / EfiShell.h
index 8421056145d476b727b986dc89d0055a740e0ae8..967bdc5ca88a71de0a008c729543d4292142f486 100644 (file)
   0x6302d008, 0x7f9b, 0x4f30, { 0x87, 0xac, 0x60, 0xc9, 0xfe, 0xf5, 0xda, 0x4e } \\r
   }\r
 \r
-typedef struct _EFI_LIST_ENTRY {\r
-  struct _EFI_LIST_ENTRY *Flink;\r
-  struct _EFI_LIST_ENTRY *Blink;\r
-} EFI_LIST_ENTRY;\r
-\r
+// replaced EFI_LIST_ENTRY with LIST_ENTRY for simplicity.\r
+// they are identical outside of the name.\r
 typedef struct {\r
-  EFI_LIST_ENTRY Link;\r
+  LIST_ENTRY Link;\r
   EFI_STATUS Status;\r
   CONST CHAR16 *FullName;\r
   CONST CHAR16 *FileName;\r
@@ -317,6 +314,16 @@ typedef UINT32 EFI_SHELL_DEVICE_NAME_FLAGS;
   handle. If no user-readable name could be generated, then *BestDeviceName will be\r
   NULL and EFI_NOT_FOUND will be returned.\r
 \r
+  If EFI_DEVICE_NAME_USE_COMPONENT_NAME is set, then the function will return the\r
+  device's name using the EFI_COMPONENT_NAME2_PROTOCOL, if present on\r
+  DeviceHandle.\r
+\r
+  If EFI_DEVICE_NAME_USE_DEVICE_PATH is set, then the function will return the\r
+  device's name using the EFI_DEVICE_PATH_PROTOCOL, if present on DeviceHandle.\r
+  If both EFI_DEVICE_NAME_USE_COMPONENT_NAME and\r
+  EFI_DEVICE_NAME_USE_DEVICE_PATH are set, then\r
+  EFI_DEVICE_NAME_USE_COMPONENT_NAME will have higher priority.\r
+\r
   @param DeviceHandle           The handle of the device.\r
   @param Flags                  Determines the possible sources of component names. \r
   @param Language               A pointer to the language specified for the device \r
@@ -494,7 +501,7 @@ typedef
 EFI_STATUS\r
 (EFIAPI *EFI_SHELL_GET_HELP_TEXT) (\r
   IN CONST CHAR16 *Command,\r
-  IN CONST CHAR16 *Sections,\r
+  IN CONST CHAR16 *Sections OPTIONAL,\r
   OUT CHAR16 **HelpText\r
   );\r
 \r
@@ -895,9 +902,9 @@ EFI_STATUS
 typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_SHELL_WRITE_FILE)(\r
-  IN EFI_FILE_HANDLE FileHandle,\r
-  IN OUT UINTN *BufferSize,\r
-  OUT VOID *Buffer\r
+  IN EFI_FILE_HANDLE            FileHandle,\r
+  IN OUT UINTN                  *BufferSize,\r
+  IN VOID                       *Buffer\r
   );\r
 \r
 typedef struct _EFI_SHELL_PROTOCOL {\r
@@ -946,4 +953,9 @@ typedef struct _EFI_SHELL_PROTOCOL {
 \r
 extern EFI_GUID gEfiShellProtocolGuid;\r
 \r
+enum ShellVersion {\r
+  SHELL_MAJOR_VERSION = 2,\r
+  SHELL_MINOR_VERSION = 0\r
+};\r
+\r
 #endif\r