Update man page for multipath -r
[platform/upstream/multipath-tools.git] / kpartx / efi.h
1 /*
2   efi.[ch] - Manipulates EFI variables as exported in /proc/efi/vars
3  
4   Copyright (C) 2001 Dell Computer Corporation <Matt_Domsch@dell.com>
5  
6     This program is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10
11     This program is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with this program; if not, write to the Free Software
18     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #ifndef EFI_H
22 #define EFI_H
23
24 /*
25  * Extensible Firmware Interface
26  * Based on 'Extensible Firmware Interface Specification'
27  *      version 1.02, 12 December, 2000
28  */
29 #include <stdint.h>
30 #include <string.h>
31
32 typedef struct {
33         uint8_t  b[16];
34 } efi_guid_t;
35
36 #define EFI_GUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \
37 ((efi_guid_t) \
38 {{ (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff, \
39   (b) & 0xff, ((b) >> 8) & 0xff, \
40   (c) & 0xff, ((c) >> 8) & 0xff, \
41   (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }})
42
43
44 /******************************************************
45  * GUIDs
46  ******************************************************/
47 #define NULL_GUID \
48 EFI_GUID( 0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00)
49
50 static inline int
51 efi_guidcmp(efi_guid_t left, efi_guid_t right)
52 {
53         return memcmp(&left, &right, sizeof (efi_guid_t));
54 }
55
56 typedef uint16_t efi_char16_t;          /* UNICODE character */
57
58 #endif /* EFI_H */