]> git.proxmox.com Git - mirror_edk2.git/blobdiff - DuetPkg/FSVariable/VariableStorage.h
DuetPkg FSVariable: return error for empty str VariableName to GetVariable
[mirror_edk2.git] / DuetPkg / FSVariable / VariableStorage.h
index 3ebfaeb5db2fe692294de5d33fceef791e034b59..48cbd5d8056a4376ea4d264ecc8bb15b52fca34c 100644 (file)
@@ -1,7 +1,13 @@
 /*++\r
 \r
-Copyright (c) 2006 - 2007, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
+Caution: This file is used for Duet platform only, do not use them in real platform.\r
+All variable code, variable metadata, and variable data used by Duet platform are on \r
+disk. They can be changed by user. BIOS is not able to protoect those.\r
+Duet trusts all meta data from disk. If variable code, variable metadata and variable\r
+data is modified in inproper way, the behavior is undefined.\r
+\r
+Copyright (c) 2006 - 2014, 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
@@ -24,8 +30,8 @@ Revision History
 #define _VARIABLE_STORAGE_H_\r
 \r
 #define VAR_DEFAULT_VALUE           (0xff)\r
-#define VAR_DEFAULT_VALUE_16        EFI_SIGNATURE_16 (VAR_DEFAULT_VALUE, VAR_DEFAULT_VALUE)\r
-#define VAR_DEFAULT_VALUE_32        EFI_SIGNATURE_32 (VAR_DEFAULT_VALUE, VAR_DEFAULT_VALUE, \\r
+#define VAR_DEFAULT_VALUE_16        SIGNATURE_16 (VAR_DEFAULT_VALUE, VAR_DEFAULT_VALUE)\r
+#define VAR_DEFAULT_VALUE_32        SIGNATURE_32 (VAR_DEFAULT_VALUE, VAR_DEFAULT_VALUE, \\r
                                                       VAR_DEFAULT_VALUE, VAR_DEFAULT_VALUE)\r
 \r
 typedef struct _VARIABLE_STORAGE VARIABLE_STORAGE;\r
@@ -100,7 +106,8 @@ typedef struct _VS_DEV {
 \r
 } VS_DEV;\r
 \r
-#define DEV_FROM_THIS(a)        CR (a, VS_DEV, VarStore, VARIABLE_STORE_SIGNATURE)\r
+#define VS_DEV_SIGNATURE        SIGNATURE_32 ('$', 'V', 'S', 'D')\r
+#define DEV_FROM_THIS(a)        CR (a, VS_DEV, VarStore, VS_DEV_SIGNATURE)\r
 \r
 #define VAR_DATA_PTR(a)         ((a)->Info.Data)\r
 #define VAR_FILE_DEVICEPATH(a)  ((a)->Info.FileInfo.DevicePath)\r