From a0c56a8219ec268d8ac4e051035f1636545cc478 Mon Sep 17 00:00:00 2001 From: lgao4 Date: Sun, 18 Sep 2011 12:25:27 +0000 Subject: Clean up the private GUID definition in module Level. 0. Remove the unused private GUID from module source files. 1. Use gEfiCallerIdGuid replace of the private module GUID. 2. Add the public header files to define HII FormSet and PackageList GUID used in every HII driver. Signed-off-by: lgao4 Reviewed-by: ydong10 gdong1 tye jfan12 wli12 rsun3 jyao1 ftian git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12375 6f19259b-4bc3-4df7-8a09-765794883524 --- .../UserIdentifyManagerDxe/UserIdentifyManager.c | 30 ++++++++-------------- .../UserIdentifyManagerData.h | 12 ++------- .../UserIdentifyManagerDxe.inf | 2 ++ 3 files changed, 15 insertions(+), 29 deletions(-) (limited to 'SecurityPkg/UserIdentification/UserIdentifyManagerDxe') diff --git a/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManager.c b/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManager.c index 64388130e1..e846b71f03 100644 --- a/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManager.c +++ b/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManager.c @@ -14,11 +14,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "UserIdentifyManager.h" -// -// Guid used in user profile saving and in form browser. -// -EFI_GUID mUserManagerGuid = USER_IDENTIFY_MANAGER_GUID; - // // Default user name. // @@ -54,10 +49,7 @@ HII_VENDOR_DEVICE_PATH mHiiVendorDevicePath = { (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8) } }, - // - // {ACA7C06F-743C-454f-9C6D-692138482498} - // - { 0xaca7c06f, 0x743c, 0x454f, { 0x9c, 0x6d, 0x69, 0x21, 0x38, 0x48, 0x24, 0x98 } } + USER_IDENTIFY_MANAGER_GUID }, { END_DEVICE_PATH_TYPE, @@ -1152,7 +1144,7 @@ SaveNvUserProfile ( // Status = gRT->SetVariable ( User->UserVarName, - &mUserManagerGuid, + &gUserIdentifyManagerGuid, EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS, Delete ? 0 : User->UserProfileSize, User->ProfileInfo @@ -2812,7 +2804,7 @@ IdentifyOrTypeUser ( HiiUpdateForm ( mCallbackInfo->HiiHandle, // HII handle - &mUserManagerGuid, // Formset GUID + &gUserIdentifyManagerGuid,// Formset GUID FORMID_PROVIDER_FORM, // Form ID StartOpCodeHandle, // Label for where to insert opcodes EndOpCodeHandle // Replace data @@ -2916,7 +2908,7 @@ UserIdentifyManagerCallback ( HiiUpdateForm ( mCallbackInfo->HiiHandle, // HII handle - &mUserManagerGuid, // Formset GUID + &gUserIdentifyManagerGuid,// Formset GUID FORMID_USER_FORM, // Form ID StartOpCodeHandle, // Label for where to insert opcodes EndOpCodeHandle // Replace data @@ -3058,7 +3050,7 @@ InitUserProfileDb ( // Get variable value. // VarSize = CurVarSize; - Status = gRT->GetVariable (VarName, &mUserManagerGuid, &VarAttr, &VarSize, VarData); + Status = gRT->GetVariable (VarName, &gUserIdentifyManagerGuid, &VarAttr, &VarSize, VarData); if (Status == EFI_BUFFER_TOO_SMALL) { FreePool (VarData); VarData = AllocatePool (VarSize); @@ -3068,7 +3060,7 @@ InitUserProfileDb ( } CurVarSize = VarSize; - Status = gRT->GetVariable (VarName, &mUserManagerGuid, &VarAttr, &VarSize, VarData); + Status = gRT->GetVariable (VarName, &gUserIdentifyManagerGuid, &VarAttr, &VarSize, VarData); } if (EFI_ERROR (Status)) { @@ -3082,7 +3074,7 @@ InitUserProfileDb ( // Check variable attributes. // if (VarAttr != (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS)) { - Status = gRT->SetVariable (VarName, &mUserManagerGuid, VarAttr, 0, NULL); + Status = gRT->SetVariable (VarName, &gUserIdentifyManagerGuid, VarAttr, 0, NULL); continue; } @@ -3095,7 +3087,7 @@ InitUserProfileDb ( // // Delete invalid user profile // - gRT->SetVariable (VarName, &mUserManagerGuid, VarAttr, 0, NULL); + gRT->SetVariable (VarName, &gUserIdentifyManagerGuid, VarAttr, 0, NULL); } else if (Status == EFI_OUT_OF_RESOURCES) { break; } @@ -3104,7 +3096,7 @@ InitUserProfileDb ( // Delete and save the profile again if some invalid profiles are deleted. // if (mUserProfileDb->UserProfileNum < Index) { - gRT->SetVariable (VarName, &mUserManagerGuid, VarAttr, 0, NULL); + gRT->SetVariable (VarName, &gUserIdentifyManagerGuid, VarAttr, 0, NULL); SaveNvUserProfile (mUserProfileDb->UserProfile[mUserProfileDb->UserProfileNum - 1], FALSE); } } @@ -3349,7 +3341,7 @@ InitFormBrowser ( // Publish HII data. // CallbackInfo->HiiHandle = HiiAddPackages ( - &mUserManagerGuid, + &gUserIdentifyManagerGuid, CallbackInfo->DriverHandle, UserIdentifyManagerStrings, UserIdentifyManagerVfrBin, @@ -3590,7 +3582,7 @@ IdentifyUser ( mCallbackInfo->FormBrowser2, &mCallbackInfo->HiiHandle, 1, - &mUserManagerGuid, + &gUserIdentifyManagerGuid, 0, NULL, NULL diff --git a/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerData.h b/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerData.h index d91de101f7..5efc50d16b 100644 --- a/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerData.h +++ b/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerData.h @@ -1,7 +1,7 @@ /** @file Data structure used by the user identify manager driver. -Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.
+Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -15,15 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef _USER_IDENTIFY_MANAGER_DATA_H_ #define _USER_IDENTIFY_MANAGER_DATA_H_ -#include "UserIdentifyManagerStrDefs.h" - -// -// Guid used in user profile saving and in form browser. -// -#define USER_IDENTIFY_MANAGER_GUID \ - { \ - 0x3ccd3dd8, 0x8d45, 0x4fed, { 0x96, 0x2d, 0x2b, 0x38, 0xcd, 0x82, 0xb3, 0xc4 } \ - } +#include // // Forms definition. diff --git a/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerDxe.inf b/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerDxe.inf index d5fccea342..a8d7818597 100644 --- a/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerDxe.inf +++ b/SecurityPkg/UserIdentification/UserIdentifyManagerDxe/UserIdentifyManagerDxe.inf @@ -30,6 +30,7 @@ [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec + SecurityPkg/SecurityPkg.dec [LibraryClasses] UefiRuntimeServicesTableLib @@ -44,6 +45,7 @@ [Guids] gEfiIfrTianoGuid ## CONSUMES ## Guid gEfiEventUserProfileChangedGuid ## CONSUMES ## Guid + gUserIdentifyManagerGuid ## PRODUCES ## Guid [Protocols] gEfiFormBrowser2ProtocolGuid ## CONSUMES -- cgit v1.2.3