]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/Dxe/Include/RtDevicePath.h
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / Dxe / Include / RtDevicePath.h
CommitLineData
3eb9473e 1/*++\r
2\r
4ea9375a
HT
3Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 RtDevicePath.h\r
15\r
16Abstract:\r
17\r
18 Device Path services. The thing to remember is device paths are built out of\r
19 nodes. The device path is terminated by an end node that is length\r
20 sizeof(EFI_DEVICE_PATH_PROTOCOL). That would be why there is sizeof(EFI_DEVICE_PATH_PROTOCOL)\r
21 all over this file.\r
22\r
23 The only place where multi-instance device paths are supported is in\r
24 environment varibles. Multi-instance device paths should never be placed\r
25 on a Handle.\r
26\r
27--*/\r
28#ifndef _RT_DEVICE_PATH_H_\r
29#define _RT_DEVICE_PATH_H_\r
30\r
31BOOLEAN\r
32RtEfiIsDevicePathMultiInstance (\r
33 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
34 )\r
35/*++\r
36\r
37Routine Description:\r
38 Return TRUE is this is a multi instance device path.\r
39\r
40Arguments:\r
41 DevicePath - A pointer to a device path data structure.\r
42\r
43\r
44Returns:\r
45 TRUE - If DevicePath is multi instance. \r
46 FALSE - If DevicePath is not multi instance.\r
47\r
48--*/\r
49;\r
50\r
51EFI_DEVICE_PATH_PROTOCOL *\r
52RtEfiDevicePathInstance (\r
53 IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath,\r
54 OUT UINTN *Size\r
55 )\r
56/*++\r
57\r
58Routine Description:\r
59 Function retrieves the next device path instance from a device path data structure.\r
60\r
61Arguments:\r
62 DevicePath - A pointer to a device path data structure.\r
63\r
64 Size - A pointer to the size of a device path instance in bytes.\r
65\r
66Returns:\r
67\r
68 This function returns a pointer to the current device path instance.\r
69 In addition, it returns the size in bytes of the current device path instance in Size,\r
70 and a pointer to the next device path instance in DevicePath.\r
71 If there are no more device path instances in DevicePath, then DevicePath will be set to NULL.\r
72\r
73--*/\r
74;\r
75\r
76UINTN\r
77RtEfiDevicePathSize (\r
78 IN EFI_DEVICE_PATH_PROTOCOL *DevPath\r
79 )\r
80/*++\r
81\r
82Routine Description:\r
83\r
84 Calculate the size of a whole device path. \r
85 \r
86Arguments:\r
87\r
88 DevPath - The pointer to the device path data.\r
89 \r
90Returns:\r
91\r
92 Size of device path data structure..\r
93\r
94--*/\r
95;\r
96\r
97EFI_DEVICE_PATH_PROTOCOL *\r
98RtEfiAppendDevicePath (\r
99 IN EFI_DEVICE_PATH_PROTOCOL *Src1,\r
100 IN EFI_DEVICE_PATH_PROTOCOL *Src2\r
101 )\r
102/*++\r
103\r
104Routine Description:\r
105 Function is used to append a Src1 and Src2 together.\r
106\r
107Arguments:\r
108 Src1 - A pointer to a device path data structure.\r
109\r
110 Src2 - A pointer to a device path data structure.\r
111\r
112Returns:\r
113\r
114 A pointer to the new device path is returned.\r
115 NULL is returned if space for the new device path could not be allocated from pool.\r
116 It is up to the caller to free the memory used by Src1 and Src2 if they are no longer needed.\r
117\r
118--*/\r
119;\r
120\r
121EFI_DEVICE_PATH_PROTOCOL *\r
122RtEfiDevicePathFromHandle (\r
123 IN EFI_HANDLE Handle\r
124 )\r
125/*++\r
126\r
127Routine Description:\r
128\r
129 Locate device path protocol interface on a device handle.\r
130\r
131Arguments:\r
132\r
133 Handle - The device handle\r
134\r
135Returns:\r
136\r
137 Device path protocol interface located.\r
138\r
139--*/\r
140;\r
141\r
142EFI_DEVICE_PATH_PROTOCOL *\r
143RtEfiDuplicateDevicePath (\r
144 IN EFI_DEVICE_PATH_PROTOCOL *DevPath\r
145 )\r
146/*++\r
147\r
148Routine Description:\r
149 Duplicate a new device path data structure from the old one.\r
150\r
151Arguments:\r
152 DevPath - A pointer to a device path data structure.\r
153\r
154Returns:\r
155 A pointer to the new allocated device path data.\r
156 Caller must free the memory used by DevicePath if it is no longer needed.\r
157\r
158--*/\r
159;\r
160\r
161EFI_DEVICE_PATH_PROTOCOL *\r
162RtEfiAppendDevicePathNode (\r
163 IN EFI_DEVICE_PATH_PROTOCOL *Src1,\r
164 IN EFI_DEVICE_PATH_PROTOCOL *Src2\r
165 )\r
166/*++\r
167\r
168Routine Description:\r
169 Function is used to append a device path node to the end of another device path.\r
170\r
171Arguments:\r
172 Src1 - A pointer to a device path data structure.\r
173\r
174 Src2 - A pointer to a device path data structure.\r
175\r
176Returns:\r
177 This function returns a pointer to the new device path.\r
178 If there is not enough temporary pool memory available to complete this function,\r
179 then NULL is returned.\r
180\r
181\r
182--*/\r
183;\r
184\r
185EFI_DEVICE_PATH_PROTOCOL *\r
186RtEfiFileDevicePath (\r
187 IN EFI_HANDLE Device OPTIONAL,\r
188 IN CHAR16 *FileName\r
189 )\r
190/*++\r
191\r
192Routine Description:\r
193 Create a device path that appends a MEDIA_DEVICE_PATH with\r
194 FileNameGuid to the device path of DeviceHandle.\r
195\r
196Arguments:\r
197 Device - Optional Device Handle to use as Root of the Device Path\r
198\r
199 FileName - FileName\r
200\r
201Returns:\r
202 EFI_DEVICE_PATH_PROTOCOL that was allocated from dynamic memory\r
203 or NULL pointer.\r
204\r
205--*/\r
206;\r
207\r
208EFI_DEVICE_PATH_PROTOCOL *\r
209RtEfiAppendDevicePathInstance (\r
210 IN EFI_DEVICE_PATH_PROTOCOL *Src,\r
211 IN EFI_DEVICE_PATH_PROTOCOL *Instance\r
212 )\r
213/*++\r
214\r
215Routine Description:\r
216\r
217 Append a device path instance to another.\r
218\r
219Arguments:\r
220\r
221 Src - The device path instance to be appended with.\r
222 Instance - The device path instance appending the other.\r
223\r
224Returns:\r
225\r
226 The contaction of these two.\r
227\r
228--*/\r
229;\r
230\r
231#endif\r