boot_vfs.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef _BOOT_VFS_H_
  13. #define _BOOT_VFS_H_
  14. #include "osi_compiler.h"
  15. #include "sffs.h"
  16. #include <stdint.h>
  17. #include <stdbool.h>
  18. #include <stddef.h>
  19. OSI_EXTERN_C_BEGIN
  20. // Bootloader will supported a simplified version of VFS.
  21. //
  22. // The reason not to reuse appication vfs is bootloader is more sensitive
  23. // to code size.
  24. //
  25. // * Only SFFS is supported
  26. // * Not all vfs APIs are implemented
  27. // * Restrictions for path:
  28. // * Must started with '/'
  29. // * No "." and ".."
  30. // * "//" is not supported
  31. bool bootVfsMount(const char *path, sffsFs_t *fs);
  32. OSI_EXTERN_C_END
  33. #endif