diff options
| author | yangjie11 <[email protected]> | 2018-11-28 19:02:11 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-11-28 19:02:11 +0800 |
| commit | 1a7f95f92b84b0a3acd6243cb2a658b4f9b6f1ac (patch) | |
| tree | 3b90c3e4b7ced83ce239ae8df020926eaf74d7de /components/dfs/include | |
| parent | 4a43d3cdae1b731dcf51d3531048c51fd4142516 (diff) | |
| parent | d4469fe7d83d08913d096dc6d75a750dd854c0cc (diff) | |
Merge pull request #1 from RT-Thread/master
test
Diffstat (limited to 'components/dfs/include')
| -rw-r--r-- | components/dfs/include/dfs.h | 18 | ||||
| -rw-r--r-- | components/dfs/include/dfs_file.h | 18 | ||||
| -rw-r--r-- | components/dfs/include/dfs_fs.h | 18 | ||||
| -rw-r--r-- | components/dfs/include/dfs_poll.h | 19 | ||||
| -rw-r--r-- | components/dfs/include/dfs_posix.h | 22 | ||||
| -rw-r--r-- | components/dfs/include/dfs_private.h | 9 | ||||
| -rw-r--r-- | components/dfs/include/dfs_select.h | 9 |
7 files changed, 43 insertions, 70 deletions
diff --git a/components/dfs/include/dfs.h b/components/dfs/include/dfs.h index f17458bd69..7fdcb1cfda 100644 --- a/components/dfs/include/dfs.h +++ b/components/dfs/include/dfs.h @@ -1,21 +1,7 @@ /* - * File : dfs.h - * This file is part of Device File System in RT-Thread RTOS - * COPYRIGHT (C) 2004-2012, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes diff --git a/components/dfs/include/dfs_file.h b/components/dfs/include/dfs_file.h index 5dc3946899..7ef681a247 100644 --- a/components/dfs/include/dfs_file.h +++ b/components/dfs/include/dfs_file.h @@ -1,21 +1,7 @@ /* - * File : dfs_file.h - * This file is part of Device File System in RT-Thread RTOS - * COPYRIGHT (C) 2004-2012, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes diff --git a/components/dfs/include/dfs_fs.h b/components/dfs/include/dfs_fs.h index 38d8766ee1..711771a137 100644 --- a/components/dfs/include/dfs_fs.h +++ b/components/dfs/include/dfs_fs.h @@ -1,21 +1,7 @@ /* - * File : dfs_fs.h - * This file is part of Device File System in RT-Thread RTOS - * COPYRIGHT (C) 2004-2012, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes diff --git a/components/dfs/include/dfs_poll.h b/components/dfs/include/dfs_poll.h index cfdf74fbe4..d9597a4364 100644 --- a/components/dfs/include/dfs_poll.h +++ b/components/dfs/include/dfs_poll.h @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2018, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + */ + #ifndef DFS_POLL_H__ #define DFS_POLL_H__ @@ -6,6 +15,7 @@ #ifdef RT_USING_POSIX #include <sys/time.h> /* for struct timeval */ +#if !defined(POLLIN) && !defined(POLLOUT) #define POLLIN (0x01) #define POLLRDNORM (0x01) #define POLLRDBAND (0x01) @@ -19,8 +29,6 @@ #define POLLHUP (0x08) #define POLLNVAL (0x10) -#define POLLMASK_DEFAULT (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM) - typedef unsigned int nfds_t; struct pollfd @@ -29,9 +37,10 @@ struct pollfd short events; short revents; }; +#endif /* !defined(POLLIN) && !defined(POLLOUT) */ +#define POLLMASK_DEFAULT (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM) int poll(struct pollfd *fds, nfds_t nfds, int timeout); -#endif - -#endif +#endif /* RT_USING_POSIX */ +#endif /* DFS_POLL_H__ */ diff --git a/components/dfs/include/dfs_posix.h b/components/dfs/include/dfs_posix.h index b751f1ed17..bc8ff1c698 100644 --- a/components/dfs/include/dfs_posix.h +++ b/components/dfs/include/dfs_posix.h @@ -1,21 +1,7 @@ /* - * File : dfs_posix.h - * This file is part of Device File System in RT-Thread RTOS - * COPYRIGHT (C) 2004-2012, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes @@ -55,13 +41,15 @@ int closedir(DIR* d); /* file api*/ int open(const char *file, int flags, ...); int close(int d); -#ifdef RT_USING_NEWLIB + +#if defined(RT_USING_NEWLIB) && defined(_EXFUN) _READ_WRITE_RETURN_TYPE _EXFUN(read, (int __fd, void *__buf, size_t __nbyte)); _READ_WRITE_RETURN_TYPE _EXFUN(write, (int __fd, const void *__buf, size_t __nbyte)); #else int read(int fd, void *buf, size_t len); int write(int fd, const void *buf, size_t len); #endif + off_t lseek(int fd, off_t offset, int whence); int rename(const char *from, const char *to); int unlink(const char *pathname); diff --git a/components/dfs/include/dfs_private.h b/components/dfs/include/dfs_private.h index 43be0db00e..e20680d9df 100644 --- a/components/dfs/include/dfs_private.h +++ b/components/dfs/include/dfs_private.h @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2018, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + */ + #ifndef DFS_PRIVATE_H__ #define DFS_PRIVATE_H__ diff --git a/components/dfs/include/dfs_select.h b/components/dfs/include/dfs_select.h index 1c51b1df38..3ac5817874 100644 --- a/components/dfs/include/dfs_select.h +++ b/components/dfs/include/dfs_select.h @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2018, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + */ + #ifndef DFS_SELECT_H__ #define DFS_SELECT_H__ |
