Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Mr_Pangza
rt-thread
提交
c0f15a59
R
rt-thread
项目概览
Mr_Pangza
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
2
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c0f15a59
编写于
1月 05, 2019
作者:
armink_ztl
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[component] Sync to master (
366e28f4
).
上级
1805aadb
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
45 addition
and
18 deletion
+45
-18
components/dfs/src/dfs.c
components/dfs/src/dfs.c
+9
-0
components/libc/compilers/armlibc/stubs.c
components/libc/compilers/armlibc/stubs.c
+4
-1
components/libc/compilers/newlib/syscalls.c
components/libc/compilers/newlib/syscalls.c
+3
-1
components/net/at/at_socket/at_socket.c
components/net/at/at_socket/at_socket.c
+26
-14
components/utilities/ulog/backend/console_be.c
components/utilities/ulog/backend/console_be.c
+2
-1
components/utilities/ulog/ulog.c
components/utilities/ulog/ulog.c
+1
-1
未找到文件。
components/dfs/src/dfs.c
浏览文件 @
c0f15a59
...
...
@@ -18,6 +18,10 @@
#include <lwp.h>
#endif
#ifdef RT_USING_DFS_DEVFS
#include <libc.h>
#endif
/* Global variables */
const
struct
dfs_filesystem_ops
*
filesystem_operation_table
[
DFS_FILESYSTEM_TYPES_MAX
];
struct
dfs_filesystem
filesystem_table
[
DFS_FILESYSTEMS_MAX
];
...
...
@@ -212,6 +216,11 @@ struct dfs_fd *fd_get(int fd)
struct
dfs_fd
*
d
;
struct
dfs_fdtable
*
fdt
;
#ifdef RT_USING_DFS_DEVFS
if
((
0
<=
fd
)
&&
(
fd
<=
2
))
fd
=
libc_stdio_get_console
();
#endif
fdt
=
dfs_fdtable_get
();
fd
=
fd
-
DFS_FD_OFFSET
;
if
(
fd
<
0
||
fd
>=
fdt
->
maxfd
)
...
...
components/libc/compilers/armlibc/stubs.c
浏览文件 @
c0f15a59
...
...
@@ -270,7 +270,10 @@ long _sys_flen(FILEHANDLE fh)
int
_sys_istty
(
FILEHANDLE
fh
)
{
return
0
;
if
((
STDIN
<=
fh
)
&&
(
fh
<=
STDERR
))
return
1
;
else
return
0
;
}
int
remove
(
const
char
*
filename
)
...
...
components/libc/compilers/newlib/syscalls.c
浏览文件 @
c0f15a59
...
...
@@ -9,6 +9,8 @@
#include <reent.h>
#include <sys/errno.h>
#include <sys/time.h>
#include <stdio.h>
#include <rtthread.h>
#ifdef RT_USING_DFS
...
...
@@ -218,7 +220,7 @@ _ssize_t
_write_r
(
struct
_reent
*
ptr
,
int
fd
,
const
void
*
buf
,
size_t
nbytes
)
{
#ifndef RT_USING_DFS
if
(
f
d
==
0
)
if
(
f
ileno
(
stdout
)
==
fd
)
{
rt_device_t
console
;
...
...
components/net/at/at_socket/at_socket.c
浏览文件 @
c0f15a59
...
...
@@ -572,10 +572,16 @@ __exit:
if
(
result
<
0
)
{
at_do_event_changes
(
sock
,
AT_EVENT_ERROR
,
RT_TRUE
);
if
(
sock
!=
RT_NULL
)
{
at_do_event_changes
(
sock
,
AT_EVENT_ERROR
,
RT_TRUE
);
}
}
at_do_event_changes
(
sock
,
AT_EVENT_SEND
,
RT_TRUE
);
if
(
sock
)
{
at_do_event_changes
(
sock
,
AT_EVENT_SEND
,
RT_TRUE
);
}
return
result
;
}
...
...
@@ -699,24 +705,27 @@ int at_recvfrom(int socket, void *mem, size_t len, int flags, struct sockaddr *f
__exit:
if
(
recv_len
>
0
)
if
(
sock
!=
RT_NULL
)
{
result
=
recv_len
;
at_do_event_changes
(
sock
,
AT_EVENT_RECV
,
RT_FALSE
);
errno
=
0
;
if
(
!
rt_slist_isempty
(
&
sock
->
recvpkt_list
))
if
(
recv_len
>
0
)
{
at_do_event_changes
(
sock
,
AT_EVENT_RECV
,
RT_TRUE
);
result
=
recv_len
;
at_do_event_changes
(
sock
,
AT_EVENT_RECV
,
RT_FALSE
);
errno
=
0
;
if
(
!
rt_slist_isempty
(
&
sock
->
recvpkt_list
))
{
at_do_event_changes
(
sock
,
AT_EVENT_RECV
,
RT_TRUE
);
}
else
{
at_do_event_clean
(
sock
,
AT_EVENT_RECV
);
}
}
else
{
at_do_event_c
lean
(
sock
,
AT_EVENT_RECV
);
at_do_event_c
hanges
(
sock
,
AT_EVENT_ERROR
,
RT_TRUE
);
}
}
else
{
at_do_event_changes
(
sock
,
AT_EVENT_ERROR
,
RT_TRUE
);
}
return
result
;
}
...
...
@@ -807,7 +816,10 @@ __exit:
if
(
result
<
0
)
{
at_do_event_changes
(
sock
,
AT_EVENT_ERROR
,
RT_TRUE
);
if
(
sock
!=
RT_NULL
)
{
at_do_event_changes
(
sock
,
AT_EVENT_ERROR
,
RT_TRUE
);
}
}
else
{
...
...
components/utilities/ulog/backend/console_be.c
浏览文件 @
c0f15a59
...
...
@@ -45,12 +45,13 @@ void ulog_console_backend_output(struct ulog_backend *backend, rt_uint32_t level
int
ulog_console_backend_init
(
void
)
{
ulog_init
();
console
.
output
=
ulog_console_backend_output
;
ulog_backend_register
(
&
console
,
"console"
,
RT_TRUE
);
return
0
;
}
INIT_
COMPONENT
_EXPORT
(
ulog_console_backend_init
);
INIT_
PREV
_EXPORT
(
ulog_console_backend_init
);
#endif
/* ULOG_BACKEND_USING_CONSOLE */
components/utilities/ulog/ulog.c
浏览文件 @
c0f15a59
...
...
@@ -149,7 +149,7 @@ size_t ulog_strcpy(size_t cur_len, char *dst, const char *src)
while
(
*
src
!=
0
)
{
/* make sure destination has enough space */
if
(
cur_len
++
<
=
ULOG_LINE_BUF_SIZE
)
if
(
cur_len
++
<
ULOG_LINE_BUF_SIZE
)
{
*
dst
++
=
*
src
++
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录