• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*++
2 
3 Copyright (c) 2004 - 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
8 
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.
11 
12 Module Name:
13 
14   EfiCompareGuid.c
15 
16 Abstract:
17 
18   Driver library routine to compare two GUIDs.
19 
20 --*/
21 
22 #include "Tiano.h"
23 #include "EfiDriverLib.h"
24 
25 BOOLEAN
EfiCompareGuid(IN EFI_GUID * Guid1,IN EFI_GUID * Guid2)26 EfiCompareGuid (
27   IN EFI_GUID *Guid1,
28   IN EFI_GUID *Guid2
29   )
30 /*++
31 
32 Routine Description:
33 
34   Compares two GUIDs
35 
36 Arguments:
37 
38   Guid1 - guid to compare
39 
40   Guid2 - guid to compare
41 
42 Returns:
43   TRUE     if Guid1 == Guid2
44   FALSE    if Guid1 != Guid2
45 
46 --*/
47 {
48   UINTN Index;
49 
50   //
51   // compare byte by byte
52   //
53   for (Index = 0; Index < 16; ++Index) {
54     if (*(((UINT8*) Guid1) + Index) != *(((UINT8*) Guid2) + Index)) {
55       return FALSE;
56     }
57   }
58   return TRUE;
59 }
60