xref: /nrf52832-nimble/rt-thread/components/libc/compilers/dlib/syscall_lseek.c (revision 042d53a763ad75cb1465103098bb88c245d95138)
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 
16 #pragma module_name = "?__lseek"
17 long __lseek(int handle, long offset, int whence)
18 {
19     if (handle == _LLIO_STDOUT ||
20         handle == _LLIO_STDERR ||
21         handle == _LLIO_STDIN)
22         return _LLIO_ERROR;
23 
24 #ifdef RT_USING_DFS
25     return lseek(handle, offset, whence);
26 #else
27     return _LLIO_ERROR;
28 #endif
29 }
30