OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
fsw_efi.h
Go to the documentation of this file.
1
6/*-
7 * Copyright (c) 2006 Christoph Pfisterer
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions are
11 * met:
12 *
13 * * Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 *
16 * * Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the
19 * distribution.
20 *
21 * * Neither the name of Christoph Pfisterer nor the names of the
22 * contributors may be used to endorse or promote products derived
23 * from this software without specific prior written permission.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 */
37
38#ifndef _FSW_EFI_H_
39#define _FSW_EFI_H_
40
41#include <Guid/AppleBless.h>
42#include "fsw_core.h"
43
44
49typedef struct {
50 UINT64 Signature;
51
52 EFI_FILE_IO_INTERFACE FileSystem;
53
54 EFI_HANDLE Handle;
55 EFI_DISK_IO *DiskIo;
56 UINT32 MediaId;
57 EFI_STATUS LastIOStatus;
58
59 struct fsw_volume *vol;
60
62
64#define FSW_VOLUME_DATA_SIGNATURE EFI_SIGNATURE_32 ('f', 's', 'w', 'V')
66#define FSW_VOLUME_FROM_FILE_SYSTEM(a) CR (a, FSW_VOLUME_DATA, FileSystem, FSW_VOLUME_DATA_SIGNATURE)
67
72typedef struct {
73 UINT64 Signature;
74
75 EFI_FILE FileHandle;
76
77 UINTN Type;
78 struct fsw_shandle shand;
79
81
83#define FSW_EFI_FILE_TYPE_FILE (0)
85#define FSW_EFI_FILE_TYPE_DIR (1)
86
88#define FSW_FILE_DATA_SIGNATURE EFI_SIGNATURE_32 ('f', 's', 'w', 'F')
90#define FSW_FILE_FROM_FILE_HANDLE(a) CR (a, FSW_FILE_DATA, FileHandle, FSW_FILE_DATA_SIGNATURE)
91
92
93//
94// Library functions
95//
96
97VOID fsw_efi_decode_time(OUT EFI_TIME *EfiTime, IN UINT32 UnixTime);
98
99UINTN fsw_efi_strsize(struct fsw_string *s);
100VOID fsw_efi_strcpy(CHAR16 *Dest, struct fsw_string *src);
101
102
103#endif
UINTN fsw_efi_strsize(struct fsw_string *s)
VOID fsw_efi_strcpy(CHAR16 *Dest, struct fsw_string *src)
VOID fsw_efi_decode_time(OUT EFI_TIME *EfiTime, IN UINT32 UnixTime)
Definition fsw_efi_lib.c:71
EFI_FILE FileHandle
Published EFI protocol interface structure.
Definition fsw_efi.h:75
UINTN Type
File type used for dispatchinng.
Definition fsw_efi.h:77
UINT64 Signature
Used to identify this structure.
Definition fsw_efi.h:73
EFI_DISK_IO * DiskIo
The Disk I/O protocol we use for disk access.
Definition fsw_efi.h:55
UINT32 MediaId
The media ID from the Block I/O protocol.
Definition fsw_efi.h:56
UINT64 Signature
Used to identify this structure.
Definition fsw_efi.h:50
EFI_FILE_IO_INTERFACE FileSystem
Published EFI protocol interface structure.
Definition fsw_efi.h:52
struct fsw_volume * vol
FSW volume structure.
Definition fsw_efi.h:59
EFI_STATUS LastIOStatus
Last status from Disk I/O.
Definition fsw_efi.h:57
EFI_HANDLE Handle
The device handle the protocol is attached to.
Definition fsw_efi.h:54