]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Include/ShellBase.h
Cd - add more input verification.
[mirror_edk2.git] / ShellPkg / Include / ShellBase.h
index 3aee67442f99c2862715b7fa7424082f19ea9490..d005544bcdc734027308c10feefc3aca40503892 100644 (file)
 \r
 **/\r
 \r
-#if !defined(__SHELL_BASE__)\r
+#ifndef __SHELL_BASE__\r
 #define __SHELL_BASE__\r
 \r
+typedef VOID *SHELL_FILE_HANDLE;\r
+\r
+#ifndef SHELL_FREE_NON_NULL\r
+#define SHELL_FREE_NON_NULL(Pointer)  \\r
+  do {                                \\r
+    if ((Pointer) != NULL) {          \\r
+      FreePool((Pointer));            \\r
+      (Pointer) = NULL;               \\r
+    }                                 \\r
+  } while(FALSE)\r
+#endif //SHELL_FREE_NON_NULL\r
+\r
 typedef enum {\r
 ///\r
 /// The operation completed successfully.\r
@@ -60,7 +72,7 @@ SHELL_NOT_READY             = 6,
 SHELL_DEVICE_ERROR          = 7,\r
 \r
 ///\r
-/// The device can not be written to.\r
+/// The device cannot be written to.\r
 ///\r
 SHELL_WRITE_PROTECTED       = 8,\r
 \r