summaryrefslogtreecommitdiff
path: root/components/dfs/filesystems/devfs
diff options
context:
space:
mode:
authorbernard <[email protected]>2017-10-17 22:27:06 +0800
committerbernard <[email protected]>2017-10-17 22:27:06 +0800
commit8a38307e2cce628017e9eb7153ae7a2430a3d9ef (patch)
tree1eb4cfdceddb9c542806acf226d463de62271abb /components/dfs/filesystems/devfs
parent947d8aa4d2d0742eb5ac1968406893f4e58a279b (diff)
[libc] Add RT_USING_POSIX macro.
1. Add macro check in rtdebug.h; 2. Use RT_USING_POSIX for poll/select, stdin etc. 3. Split dfs_posix.h to dfs_posix.h, dfs_poll.h and dfs_select.h;
Diffstat (limited to 'components/dfs/filesystems/devfs')
-rw-r--r--components/dfs/filesystems/devfs/devfs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/components/dfs/filesystems/devfs/devfs.c b/components/dfs/filesystems/devfs/devfs.c
index e61da02179..6bfeccb578 100644
--- a/components/dfs/filesystems/devfs/devfs.c
+++ b/components/dfs/filesystems/devfs/devfs.c
@@ -190,6 +190,7 @@ int dfs_device_fs_open(struct dfs_fd *file)
if (device == RT_NULL)
return -ENODEV;
+#ifdef RT_USING_POSIX
if (device->fops)
{
/* use device fops */
@@ -207,6 +208,7 @@ int dfs_device_fs_open(struct dfs_fd *file)
}
}
else
+#endif
{
result = rt_device_open(device, RT_DEVICE_OFLAG_RDWR);
if (result == RT_EOK || result == -RT_ENOSYS)