]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UnixPkg/MiscSubClassPlatformDxe/MiscSystemOptionStringFunction.c
UnixPkg: Remove UnixPkg files (It is replaced by EmulatorPkg)
[mirror_edk2.git] / UnixPkg / MiscSubClassPlatformDxe / MiscSystemOptionStringFunction.c
diff --git a/UnixPkg/MiscSubClassPlatformDxe/MiscSystemOptionStringFunction.c b/UnixPkg/MiscSubClassPlatformDxe/MiscSystemOptionStringFunction.c
deleted file mode 100644 (file)
index 145603a..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/** @file\r
-  BIOS system option string boot time changes.\r
-  SMBIOS type 12.\r
-\r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
-  This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include "MiscSubClassDriver.h"\r
-\r
-\r
-/**\r
-  This function makes boot time changes to the contents of the\r
-  MiscSystemOptionString (Type 12).\r
-\r
-  @param  RecordData                 Pointer to copy of RecordData from the Data Table.  \r
-\r
-  @retval EFI_SUCCESS                All parameters were valid.\r
-  @retval EFI_UNSUPPORTED            Unexpected RecordType value.\r
-  @retval EFI_INVALID_PARAMETER      Invalid parameter was found.\r
-\r
-**/\r
-MISC_SMBIOS_TABLE_FUNCTION(SystemOptionString)\r
-{\r
-  CHAR8                             *OptionalStrStart;\r
-  UINTN                             OptStrLen;\r
-  EFI_STRING                        OptionString;\r
-  EFI_STATUS                        Status;\r
-  STRING_REF                        TokenToGet;\r
-  EFI_SMBIOS_HANDLE                 SmbiosHandle;\r
-  SMBIOS_TABLE_TYPE12               *SmbiosRecord;\r
-\r
-  //\r
-  // First check for invalid parameters.\r
-  //\r
-  if (RecordData == NULL) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-\r
-  TokenToGet = STRING_TOKEN (STR_MISC_SYSTEM_OPTION_STRING);\r
-  OptionString = HiiGetPackageString(&gEfiCallerIdGuid, TokenToGet, NULL);\r
-  OptStrLen = StrLen(OptionString);\r
-  if (OptStrLen > SMBIOS_STRING_MAX_LENGTH) {\r
-    return EFI_UNSUPPORTED;\r
-  }\r
\r
-  //\r
-  // Two zeros following the last string.\r
-  //\r
-  SmbiosRecord = AllocatePool(sizeof (SMBIOS_TABLE_TYPE12) + OptStrLen + 1 + 1);\r
-  ZeroMem(SmbiosRecord, sizeof (SMBIOS_TABLE_TYPE12) + OptStrLen + 1 + 1);\r
-\r
-  SmbiosRecord->Hdr.Type = EFI_SMBIOS_TYPE_SYSTEM_CONFIGURATION_OPTIONS;\r
-  SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE12);\r
-  //\r
-  // Make handle chosen by smbios protocol.add automatically.\r
-  //\r
-  SmbiosRecord->Hdr.Handle = 0;  \r
-\r
-  SmbiosRecord->StringCount = 1;\r
-  OptionalStrStart = (CHAR8*) (SmbiosRecord + 1);\r
-  UnicodeStrToAsciiStr(OptionString, OptionalStrStart);\r
-  //\r
-  // Now we have got the full smbios record, call smbios protocol to add this record.\r
-  //\r
-  Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);\r
-\r
-  FreePool(SmbiosRecord);\r
-  return Status;\r
-}\r