]>
Commit | Line | Data |
---|---|---|
3eb9473e | 1 | /*++\r |
2 | \r | |
4ea9375a HT |
3 | Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>\r |
4 | This program and the accompanying materials \r | |
3eb9473e | 5 | are licensed and made available under the terms and conditions of the BSD License \r |
6 | which accompanies this distribution. The full text of the license may be found at \r | |
7 | http://opensource.org/licenses/bsd-license.php \r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
11 | \r | |
12 | Module Name:\r | |
13 | \r | |
14 | EfiCompareGuid.c\r | |
15 | \r | |
16 | Abstract:\r | |
17 | \r | |
18 | Driver library routine to compare two GUIDs.\r | |
19 | \r | |
20 | --*/\r | |
21 | \r | |
22 | #include "Tiano.h"\r | |
23 | #include "EfiDriverLib.h"\r | |
24 | \r | |
25 | BOOLEAN\r | |
26 | EfiCompareGuid (\r | |
27 | IN EFI_GUID *Guid1,\r | |
28 | IN EFI_GUID *Guid2\r | |
29 | )\r | |
30 | /*++\r | |
31 | \r | |
32 | Routine Description:\r | |
33 | \r | |
34 | Compares two GUIDs\r | |
35 | \r | |
36 | Arguments:\r | |
37 | \r | |
38 | Guid1 - guid to compare\r | |
39 | \r | |
40 | Guid2 - guid to compare\r | |
41 | \r | |
42 | Returns:\r | |
43 | TRUE if Guid1 == Guid2\r | |
44 | FALSE if Guid1 != Guid2\r | |
45 | \r | |
46 | --*/\r | |
47 | {\r | |
48 | UINTN Index;\r | |
49 | \r | |
50 | //\r | |
51 | // compare byte by byte\r | |
52 | //\r | |
53 | for (Index = 0; Index < 16; ++Index) {\r | |
54 | if (*(((UINT8*) Guid1) + Index) != *(((UINT8*) Guid2) + Index)) {\r | |
55 | return FALSE;\r | |
56 | }\r | |
57 | }\r | |
58 | return TRUE;\r | |
59 | }\r |