1 /*
2  * Copyright (C) 2023 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 
18 #include "types.h"
19 
20 #ifndef __DEVICE_PATH_PROTOCOL_H__
21 #define __DEVICE_PATH_PROTOCOL_H__
22 
23 typedef struct EfiDevicePathProtocol {
24   uint8_t type;
25   uint8_t sub_type;
26   uint8_t length[2];
27 } EfiDevicePathProtocol;
28 
29 #define EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID \
30   EFI_GUID(0x8b843e20, 0x8132, 0x4852, 0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c)
31 
32 typedef struct EfiDevicePathToTextProtocol {
33   uint16_t* (*convert_device_node_to_text)(struct EfiDevicePathProtocol* device_node,
34                                            bool display_only, bool allow_shortcuts);
35   uint16_t* (*convert_device_path_to_text)(struct EfiDevicePathProtocol* device_path,
36                                            bool display_only, bool allow_shortcuts);
37 } EfiDevicePathToTextProtocol;
38 
39 #endif  //__DEVICE_PATH_PROTOCOL_H__
40