NvVarsFileLib.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /** @file
  2. Save Non-Volatile Variables to a file system.
  3. Copyright (c) 2009 - 2019 Intel Corporation. All rights reserved. <BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #ifndef __NV_VARS_FILE_LIB_INSTANCE__
  7. #define __NV_VARS_FILE_LIB_INSTANCE__
  8. #include <Uefi.h>
  9. #include <Guid/FileInfo.h>
  10. #include <Protocol/SimpleFileSystem.h>
  11. #include <Library/BaseLib.h>
  12. #include <Library/FileHandleLib.h>
  13. #include <Library/SerializeVariablesLib.h>
  14. #include <Library/UefiBootServicesTableLib.h>
  15. #include <Library/UefiRuntimeServicesTableLib.h>
  16. #include <Library/UefiLib.h>
  17. /**
  18. Loads the non-volatile variables from the NvVars file on the
  19. given file system.
  20. @param[in] FsHandle - Handle for a gEfiSimpleFileSystemProtocolGuid instance
  21. @return EFI_STATUS based on the success or failure of load operation
  22. **/
  23. EFI_STATUS
  24. LoadNvVarsFromFs (
  25. EFI_HANDLE FsHandle
  26. );
  27. /**
  28. Saves the non-volatile variables into the NvVars file on the
  29. given file system.
  30. @param[in] FsHandle - Handle for a gEfiSimpleFileSystemProtocolGuid instance
  31. @return EFI_STATUS based on the success or failure of load operation
  32. **/
  33. EFI_STATUS
  34. SaveNvVarsToFs (
  35. EFI_HANDLE FsHandle
  36. );
  37. #endif