/* Attempts to connect the NvVarsFileLib to the specified file system. */
EFI_STATUS EFIAPI ConnectNvVarsToFileSystem(IN EFI_HANDLE FsHandle)
/* Attempts to connect the NvVarsFileLib to the specified file system. */
EFI_STATUS EFIAPI ConnectNvVarsToFileSystem(IN EFI_HANDLE FsHandle)
{
  EFI_STATUS  Status;
  if (FeaturePcdGet (PcdSecureBootSupported) ||
      FeaturePcdGet (PcdBootRestrictToFirmware))
  {
    return EFI_UNSUPPORTED;
  }
  LoadNvVarsFromFs (FsHandle);
  Status = SaveNvVarsToFs (FsHandle);
  if (!EFI_ERROR (Status)) {
    mNvVarsFileLibFsHandle = FsHandle;
  }
  return Status;
}