1
0

syscall_lseek.c 611 B

1234567891011121314151617181920212223242526272829
  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. * 2015-01-28 Bernard first version
  9. */
  10. #include <rtthread.h>
  11. #ifdef RT_USING_DFS
  12. #include <dfs_posix.h>
  13. #endif
  14. #include <yfuns.h>
  15. #pragma module_name = "?__lseek"
  16. long __lseek(int handle, long offset, int whence)
  17. {
  18. if (handle == _LLIO_STDOUT ||
  19. handle == _LLIO_STDERR ||
  20. handle == _LLIO_STDIN)
  21. return _LLIO_ERROR;
  22. #ifdef RT_USING_DFS
  23. return lseek(handle, offset, whence);
  24. #else
  25. return _LLIO_ERROR;
  26. #endif
  27. }