mnt.c 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * File : mnt.c
  3. * COPYRIGHT (C) 2008 - 2016, RT-Thread Development Team
  4. *
  5. * Change Logs:
  6. * Date Author Notes
  7. * 2017Äê4ÔÂ3ÈÕ Urey the first version
  8. */
  9. #include <rtthread.h>
  10. #include <rtdevice.h>
  11. #ifdef RT_USING_DFS
  12. #include <dfs_fs.h>
  13. int mnt_init(void)
  14. {
  15. #ifdef RT_USING_DFS_WINSHAREDIR
  16. dfs_win32_init();
  17. rt_win_sharedir_init("wshare");
  18. if (dfs_mount("wshare", "/", "wdir", 0, 0) == 0)
  19. {
  20. rt_kprintf("File System on root initialized!\n");
  21. }
  22. else
  23. {
  24. rt_kprintf("File System on root initialization failed!\n");
  25. }
  26. if (dfs_mount("sd0", "/sd", "elm", 0, 0) == 0)
  27. {
  28. rt_kprintf("File System on sd initialized!\n");
  29. }
  30. else
  31. {
  32. rt_kprintf("File System on sd initialization failed!\n");
  33. }
  34. #else
  35. if (dfs_mount("sd0", "/", "elm", 0, 0) == 0)
  36. {
  37. rt_kprintf("File System on sd initialized!\n");
  38. }
  39. else
  40. {
  41. rt_kprintf("File System on sd initialization failed!\n");
  42. }
  43. #endif
  44. }
  45. INIT_ENV_EXPORT(mnt_init);
  46. #endif