]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/UserIdentification/UserProfileManagerDxe/ModifyIdentityPolicy.c
Enhance drivers for sanity check and coding style alignment.
[mirror_edk2.git] / SecurityPkg / UserIdentification / UserProfileManagerDxe / ModifyIdentityPolicy.c
index 2e2d67edfc82903d3dadd237088277ff51b64188..eaf53c9678de527b8238d774146525abeeeab847 100644 (file)
@@ -58,7 +58,7 @@ ProviderAlreadyInPolicy (
 \r
 \r
 /**\r
-  Add or delete the user's credential record in the provider.\r
+  Add the user's credential record in the provider.\r
 \r
   @param[in]  ProviderGuid        Point to credential provider guid.\r
   @param[in]  User                Points to user profile.\r
@@ -157,17 +157,13 @@ DeleteCredentialFromProviders (
 \r
 \r
 /**\r
-  Remove the provider in FindIdentity from the user identification information record.\r
+  Remove the provider specified by Offset from the new user identification record.\r
   \r
-  @param[in, out] NewInfo       On entry, points to the user information to remove provider. \r
-                                On return, points to the user information the provider is removed.\r
-  @param[in]      FindIdentity  Point to the user identity policy.\r
-\r
-  @retval TRUE                  The provider is removed successfully.\r
-  @retval FALSE                 Fail to remove the provider.\r
+  @param[in]  IdentityPolicy    Point to user identity item in new identification policy.\r
+  @param[in]  Offset            The item offset in the new identification policy.\r
 \r
 **/\r
-BOOLEAN\r
+VOID\r
 DeleteProviderFromPolicy (\r
   IN     EFI_USER_INFO_IDENTITY_POLICY         *IdentityPolicy,\r
   IN     UINTN                                 Offset\r
@@ -184,7 +180,7 @@ DeleteProviderFromPolicy (
     IdentityPolicy->Type           = EFI_USER_INFO_IDENTITY_TRUE;\r
     IdentityPolicy->Length         = sizeof (EFI_USER_INFO_IDENTITY_POLICY);\r
     mUserInfo.NewIdentityPolicyLen = IdentityPolicy->Length;\r
-    return TRUE;\r
+    return ;\r
   }\r
 \r
   DeleteLen = IdentityPolicy->Length + sizeof(EFI_USER_INFO_IDENTITY_POLICY);\r
@@ -196,17 +192,19 @@ DeleteProviderFromPolicy (
     CopyMem ((UINT8 *) IdentityPolicy, (UINT8 *) IdentityPolicy + DeleteLen, RemainingLen);\r
   }\r
   mUserInfo.NewIdentityPolicyLen -= DeleteLen;  \r
\r
-  return FALSE;\r
 }\r
 \r
 \r
 /**\r
-  Update the mUserInfo.NewIdentityPolicy, and UI when 'add option' is pressed.\r
+  Add a new provider to the mUserInfo.NewIdentityPolicy.\r
+\r
+  It is invoked when 'add option' in UI is pressed.\r
 \r
+  @param[in] NewGuid       Points to the credential provider guid.\r
+  \r
 **/\r
 VOID\r
- AddProviderToPolicy (\r
+AddProviderToPolicy (\r
   IN  EFI_GUID                                  *NewGuid\r
   )\r
 {\r
@@ -489,7 +487,7 @@ SaveIdentityPolicy (
 \r
 **/\r
 VOID\r
- AddIdentityPolicyItem (\r
+AddIdentityPolicyItem (\r
   VOID\r
   )\r
 {\r