]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/EfiCompareGuid.c
Add .S file for GCC tool-chain for EfiRuntimeLib.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EfiCommonLib / EfiCompareGuid.c
CommitLineData
3eb9473e 1/*++\r
2\r
3Copyright (c) 2004 - 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
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 EfiCompareGuid.c\r
15\r
16Abstract:\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
25BOOLEAN\r
26EfiCompareGuid (\r
27 IN EFI_GUID *Guid1,\r
28 IN EFI_GUID *Guid2\r
29 )\r
30/*++\r
31\r
32Routine Description:\r
33\r
34 Compares two GUIDs\r
35\r
36Arguments:\r
37\r
38 Guid1 - guid to compare\r
39\r
40 Guid2 - guid to compare\r
41\r
42Returns:\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