3 Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 Device Path services. The thing to remember is device paths are built out of
19 nodes. The device path is terminated by an end node that is length
20 sizeof(EFI_DEVICE_PATH_PROTOCOL). That would be why there is sizeof(EFI_DEVICE_PATH_PROTOCOL)
23 The only place where multi-instance device paths are supported is in
24 environment varibles. Multi-instance device paths should never be placed
28 #ifndef _RT_DEVICE_PATH_H_
29 #define _RT_DEVICE_PATH_H_
32 RtEfiIsDevicePathMultiInstance (
33 IN EFI_DEVICE_PATH_PROTOCOL
*DevicePath
38 Return TRUE is this is a multi instance device path.
41 DevicePath - A pointer to a device path data structure.
45 TRUE - If DevicePath is multi instance.
46 FALSE - If DevicePath is not multi instance.
51 EFI_DEVICE_PATH_PROTOCOL
*
52 RtEfiDevicePathInstance (
53 IN OUT EFI_DEVICE_PATH_PROTOCOL
**DevicePath
,
59 Function retrieves the next device path instance from a device path data structure.
62 DevicePath - A pointer to a device path data structure.
64 Size - A pointer to the size of a device path instance in bytes.
68 This function returns a pointer to the current device path instance.
69 In addition, it returns the size in bytes of the current device path instance in Size,
70 and a pointer to the next device path instance in DevicePath.
71 If there are no more device path instances in DevicePath, then DevicePath will be set to NULL.
78 IN EFI_DEVICE_PATH_PROTOCOL
*DevPath
84 Calculate the size of a whole device path.
88 DevPath - The pointer to the device path data.
92 Size of device path data structure..
97 EFI_DEVICE_PATH_PROTOCOL
*
98 RtEfiAppendDevicePath (
99 IN EFI_DEVICE_PATH_PROTOCOL
*Src1
,
100 IN EFI_DEVICE_PATH_PROTOCOL
*Src2
105 Function is used to append a Src1 and Src2 together.
108 Src1 - A pointer to a device path data structure.
110 Src2 - A pointer to a device path data structure.
114 A pointer to the new device path is returned.
115 NULL is returned if space for the new device path could not be allocated from pool.
116 It is up to the caller to free the memory used by Src1 and Src2 if they are no longer needed.
121 EFI_DEVICE_PATH_PROTOCOL
*
122 RtEfiDevicePathFromHandle (
129 Locate device path protocol interface on a device handle.
133 Handle - The device handle
137 Device path protocol interface located.
142 EFI_DEVICE_PATH_PROTOCOL
*
143 RtEfiDuplicateDevicePath (
144 IN EFI_DEVICE_PATH_PROTOCOL
*DevPath
149 Duplicate a new device path data structure from the old one.
152 DevPath - A pointer to a device path data structure.
155 A pointer to the new allocated device path data.
156 Caller must free the memory used by DevicePath if it is no longer needed.
161 EFI_DEVICE_PATH_PROTOCOL
*
162 RtEfiAppendDevicePathNode (
163 IN EFI_DEVICE_PATH_PROTOCOL
*Src1
,
164 IN EFI_DEVICE_PATH_PROTOCOL
*Src2
169 Function is used to append a device path node to the end of another device path.
172 Src1 - A pointer to a device path data structure.
174 Src2 - A pointer to a device path data structure.
177 This function returns a pointer to the new device path.
178 If there is not enough temporary pool memory available to complete this function,
179 then NULL is returned.
185 EFI_DEVICE_PATH_PROTOCOL
*
186 RtEfiFileDevicePath (
187 IN EFI_HANDLE Device OPTIONAL
,
193 Create a device path that appends a MEDIA_DEVICE_PATH with
194 FileNameGuid to the device path of DeviceHandle.
197 Device - Optional Device Handle to use as Root of the Device Path
202 EFI_DEVICE_PATH_PROTOCOL that was allocated from dynamic memory
208 EFI_DEVICE_PATH_PROTOCOL
*
209 RtEfiAppendDevicePathInstance (
210 IN EFI_DEVICE_PATH_PROTOCOL
*Src
,
211 IN EFI_DEVICE_PATH_PROTOCOL
*Instance
217 Append a device path instance to another.
221 Src - The device path instance to be appended with.
222 Instance - The device path instance appending the other.
226 The contaction of these two.