mnt.c 699 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. */
  8. #include <rtthread.h>
  9. #define DBG_LEVEL DBG_INFO
  10. #include <rtdbg.h>
  11. #ifdef RT_USING_DFS
  12. #include <dfs.h>
  13. int flopyy_system_init(void)
  14. {
  15. extern int rt_floppy_init(void);
  16. return rt_floppy_init();
  17. }
  18. INIT_ENV_EXPORT(flopyy_system_init);
  19. #if defined(RT_USING_DFS_ROMFS)
  20. #include <dfs_fs.h>
  21. #include <dfs_romfs.h>
  22. int mnt_init(void)
  23. {
  24. if (dfs_mount(RT_NULL, "/", "rom", 0, &(romfs_root)) == 0)
  25. {
  26. LOG_I("root filesystem mounted.");
  27. }
  28. return 0;
  29. }
  30. INIT_APP_EXPORT(mnt_init);
  31. #endif /* end of RT_USING_DFS_ROMFS */
  32. #endif /* end of RT_USING_DFS */