]>
Commit | Line | Data |
---|---|---|
949f388f | 1 | /*++ @file\r |
2 | Produce Simple File System abstractions for a directory on your PC using Unix APIs.\r | |
d18d8a1d | 3 | The configuration of what devices to mount or emulate comes from\r |
949f388f | 4 | environment variables.\r |
5 | \r | |
6 | Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r | |
7 | Portions copyright (c) 2011, Apple Inc. All rights reserved.\r | |
d18d8a1d | 8 | This program and the accompanying materials\r |
9 | are licensed and made available under the terms and conditions of the BSD License\r | |
10 | which accompanies this distribution. The full text of the license may be found at\r | |
11 | http://opensource.org/licenses/bsd-license.php\r | |
12 | \r | |
13 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
14 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
949f388f | 15 | \r |
16 | \r | |
17 | **/\r | |
18 | \r | |
19 | #ifndef _EMU_SIMPLE_FILE_SYSTEM_H_\r | |
20 | #define _EMU_SIMPLE_FILE_SYSTEM_H_\r | |
21 | \r | |
22 | #include "PiDxe.h"\r | |
23 | \r | |
24 | #include <Guid/FileSystemInfo.h>\r | |
25 | #include <Guid/FileInfo.h>\r | |
26 | #include <Guid/FileSystemVolumeLabelInfo.h>\r | |
27 | \r | |
28 | #include <Protocol/EmuIoThunk.h>\r | |
29 | #include <Protocol/SimpleFileSystem.h>\r | |
30 | \r | |
31 | #include <Library/DebugLib.h>\r | |
32 | #include <Library/BaseLib.h>\r | |
33 | #include <Library/UefiDriverEntryPoint.h>\r | |
34 | #include <Library/UefiLib.h>\r | |
35 | #include <Library/BaseMemoryLib.h>\r | |
36 | #include <Library/MemoryAllocationLib.h>\r | |
37 | #include <Library/UefiBootServicesTableLib.h>\r | |
38 | \r | |
39 | \r | |
40 | extern EFI_DRIVER_BINDING_PROTOCOL gEmuSimpleFileSystemDriverBinding;\r | |
41 | extern EFI_COMPONENT_NAME_PROTOCOL gEmuSimpleFileSystemComponentName;\r | |
42 | extern EFI_COMPONENT_NAME2_PROTOCOL gEmuSimpleFileSystemComponentName2;\r | |
43 | \r | |
44 | #define EMU_SIMPLE_FILE_SYSTEM_PRIVATE_SIGNATURE SIGNATURE_32 ('E', 'M', 'f', 's')\r | |
45 | \r | |
46 | typedef struct {\r | |
47 | UINTN Signature;\r | |
48 | EMU_IO_THUNK_PROTOCOL *IoThunk;\r | |
49 | EFI_SIMPLE_FILE_SYSTEM_PROTOCOL SimpleFileSystem;\r | |
50 | EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *Io;\r | |
51 | EFI_UNICODE_STRING_TABLE *ControllerNameTable;\r | |
52 | } EMU_SIMPLE_FILE_SYSTEM_PRIVATE;\r | |
53 | \r | |
54 | #define EMU_SIMPLE_FILE_SYSTEM_PRIVATE_DATA_FROM_THIS(a) \\r | |
55 | CR (a, \\r | |
56 | EMU_SIMPLE_FILE_SYSTEM_PRIVATE, \\r | |
57 | SimpleFileSystem, \\r | |
58 | EMU_SIMPLE_FILE_SYSTEM_PRIVATE_SIGNATURE \\r | |
59 | )\r | |
60 | \r | |
61 | #define EMU_EFI_FILE_PRIVATE_SIGNATURE SIGNATURE_32 ('e', 'm', 'f', 's')\r | |
62 | \r | |
63 | typedef struct {\r | |
64 | UINTN Signature;\r | |
65 | EMU_IO_THUNK_PROTOCOL *IoThunk;\r | |
66 | EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *SimpleFileSystem;\r | |
67 | EFI_FILE_PROTOCOL EfiFile;\r | |
68 | EFI_FILE_PROTOCOL *Io;\r | |
69 | } EMU_EFI_FILE_PRIVATE;\r | |
70 | \r | |
71 | #define EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS(a) \\r | |
72 | CR (a, \\r | |
73 | EMU_EFI_FILE_PRIVATE, \\r | |
74 | EfiFile, \\r | |
75 | EMU_EFI_FILE_PRIVATE_SIGNATURE \\r | |
76 | )\r | |
77 | \r | |
78 | \r | |
79 | \r | |
d18d8a1d | 80 | #endif\r |