mnt.c 485 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (c) 2006-2018, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. */
  9. #include <rtthread.h>
  10. #ifdef RT_USING_DFS
  11. #include <dfs_fs.h>
  12. int mnt_init(void)
  13. {
  14. if (dfs_mount("sd0", "/", "elm", 0, 0) == 0)
  15. {
  16. rt_kprintf("File System initialized!\n");
  17. }
  18. else
  19. {
  20. rt_kprintf("File System initialized failed!\n");
  21. }
  22. return 0;
  23. }
  24. INIT_ENV_EXPORT(mnt_init);
  25. #endif