]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Include/ShellBase.h
ShellPkg: Enahance 'dh' command to add more protocols decoding support
[mirror_edk2.git] / ShellPkg / Include / ShellBase.h
index d5f0b03eec30db1ff19671aecb0dde89715662f2..09f87b4cc0942e1ea200980639e8269df4d54e2a 100644 (file)
@@ -1,19 +1,29 @@
 /** @file\r
   Root include file for Shell Package modules that utilize the SHELL_RETURN type\r
 \r
-Copyright (c), 2009, Intel Corporation<BR>\r
-All rights reserved. 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
-http://opensource.org/licenses/bsd-license.php\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
+  http://opensource.org/licenses/bsd-license.php\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
-#if !defined(__SHELL_BASE__)\r
-#define __SHELL_BASE__\r
+#ifndef _SHELL_BASE_\r
+#define _SHELL_BASE_\r
+\r
+typedef VOID *SHELL_FILE_HANDLE;\r
+\r
+#define SHELL_FREE_NON_NULL(Pointer)  \\r
+  do {                                \\r
+    if ((Pointer) != NULL) {          \\r
+      FreePool((Pointer));            \\r
+      (Pointer) = NULL;               \\r
+    }                                 \\r
+  } while(FALSE)\r
 \r
 typedef enum {\r
 ///\r
@@ -60,7 +70,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
@@ -70,7 +80,7 @@ SHELL_WRITE_PROTECTED       = 8,
 SHELL_OUT_OF_RESOURCES      = 9,\r
 \r
 ///\r
-/// An inconsistency was detected on the file system causing the \r
+/// An inconsistency was detected on the file system causing the\r
 /// operation to fail.\r
 ///\r
 SHELL_VOLUME_CORRUPTED      = 10,\r
@@ -81,7 +91,7 @@ SHELL_VOLUME_CORRUPTED      = 10,
 SHELL_VOLUME_FULL           = 11,\r
 \r
 ///\r
-/// The device does not contain any medium to perform the \r
+/// The device does not contain any medium to perform the\r
 /// operation.\r
 ///\r
 SHELL_NO_MEDIA              = 12,\r
@@ -144,4 +154,4 @@ SHELL_SECURITY_VIOLATION    = 26,
 SHELL_NOT_EQUAL             = 27\r
 }SHELL_STATUS;\r
 \r
-#endif //__SHELL_BASE__
\ No newline at end of file
+#endif //__SHELL_BASE_\r