Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Kernel Liteos M
提交
23d56f4b
K
Kernel Liteos M
项目概览
OpenHarmony
/
Kernel Liteos M
大约 1 年 前同步成功
通知
20
Star
28
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel Liteos M
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
23d56f4b
编写于
7月 31, 2021
作者:
O
openharmony_ci
提交者:
Gitee
7月 31, 2021
浏览文件
操作
浏览文件
下载
差异文件
!241 M核代码告警清零
Merge pull request !241 from wangchen/m_codex
上级
8f5cefe4
cb5f862e
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
27 addition
and
35 deletion
+27
-35
components/fs/fs.c
components/fs/fs.c
+1
-1
components/fs/littlefs/lfs_api.c
components/fs/littlefs/lfs_api.c
+1
-1
components/net/lwip-2.1/enhancement/src/lwip_ifaddrs.c
components/net/lwip-2.1/enhancement/src/lwip_ifaddrs.c
+1
-1
components/net/lwip-2.1/porting/src/api_shell.c
components/net/lwip-2.1/porting/src/api_shell.c
+5
-5
components/shell/src/base/shcmd.c
components/shell/src/base/shcmd.c
+1
-1
components/shell/src/base/shmsg.c
components/shell/src/base/shmsg.c
+1
-3
components/shell/src/cmds/fullpath.c
components/shell/src/cmds/fullpath.c
+6
-9
kal/cmsis/kal.h
kal/cmsis/kal.h
+8
-8
kernel/arch/arm/cortex-m33/gcc/TZ/secure/los_secure_context.h
...el/arch/arm/cortex-m33/gcc/TZ/secure/los_secure_context.h
+0
-2
kernel/arch/risc-v/nuclei/gcc/los_context.c
kernel/arch/risc-v/nuclei/gcc/los_context.c
+0
-1
kernel/arch/risc-v/nuclei/gcc/los_interrupt.c
kernel/arch/risc-v/nuclei/gcc/los_interrupt.c
+3
-3
未找到文件。
components/fs/fs.c
浏览文件 @
23d56f4b
...
...
@@ -331,7 +331,7 @@ ssize_t read(int fd, void *buf, size_t nbyte)
errno
=
EINVAL
;
return
FS_FAILURE
;
}
if
(
nbyte
>
1024
)
{
if
(
nbyte
>
1024
)
{
/* 1024, max random_size */
nbyte
=
1024
;
/* hks_generate_random: random_size must <= 1024 */
}
struct
hks_blob
key
=
{
HKS_BLOB_TYPE_RAW
,
(
uint8_t
*
)
buf
,
nbyte
};
...
...
components/fs/littlefs/lfs_api.c
浏览文件 @
23d56f4b
...
...
@@ -41,7 +41,7 @@ struct FileOpInfo g_fsOp[LOSCFG_LFS_MAX_MOUNT_SIZE] = {0};
static
LittleFsHandleStruct
g_handle
[
LITTLE_FS_MAX_OPEN_FILES
]
=
{
0
};
struct
dirent
g_nameValue
;
static
pthread_mutex_t
g_FslocalMutex
=
PTHREAD_MUTEX_INITIALIZER
;
static
const
char
*
g_littlefsMntName
[
LOSCFG_LFS_MAX_MOUNT_SIZE
]
=
{
"/a"
,
"/b"
,
"/c"
};
static
const
char
*
g_littlefsMntName
[
LOSCFG_LFS_MAX_MOUNT_SIZE
]
=
{
"/a"
,
"/b"
,
"/c"
};
LittleFsHandleStruct
*
LfsAllocFd
(
const
char
*
fileName
,
int
*
fd
)
{
...
...
components/net/lwip-2.1/enhancement/src/lwip_ifaddrs.c
浏览文件 @
23d56f4b
...
...
@@ -242,7 +242,7 @@ static void getifaddrs_internal(struct getifaddrs_arg *arg)
if_storage
=
new_ifaddrs_storage
();
if
(
if_storage
==
NULL
)
{
lwip_freeifaddrs
(
*
(
arg
->
ifap
));
/* ifap is assigned to NULL in getifaddrs, so garbage value will not be there */
*
(
arg
->
ifap
));
/* ifap is assigned to NULL in getifaddrs, so garbage value will not be there */
arg
->
ret
=
ENOMEM
;
goto
RETURN
;
}
...
...
components/net/lwip-2.1/porting/src/api_shell.c
浏览文件 @
23d56f4b
...
...
@@ -102,10 +102,10 @@ int print_netif(struct netif *netif, char *print_buf, unsigned int buf_len)
if
(
buf_len
<
1
)
{
goto
out
;
}
if
(
netif
->
link_layer_type
==
LOOPBACK_IF
)
{
ret
=
snprintf_s
(
tmp
,
buf_len
,
(
buf_len
-
1
),
"%s
\t
"
,
netif
->
name
);
if
(
netif
->
link_layer_type
==
LOOPBACK_IF
)
{
ret
=
snprintf_s
(
tmp
,
buf_len
,
(
buf_len
-
1
),
"%s
\t
"
,
netif
->
name
);
}
else
{
ret
=
snprintf_s
(
tmp
,
buf_len
,
(
buf_len
-
1
),
"%s%u
\t
"
,
netif
->
name
,
netif
->
num
);
ret
=
snprintf_s
(
tmp
,
buf_len
,
(
buf_len
-
1
),
"%s%u
\t
"
,
netif
->
name
,
netif
->
num
);
}
if
((
ret
<=
0
)
||
((
unsigned
int
)
ret
>=
buf_len
))
...
...
@@ -329,11 +329,11 @@ LWIP_STATIC int OsPingFunc(u32_t *parg)
u32_t
iecho_len
;
s16_t
ip_hlen
;
u32_t
forever
;
u32_t
i
=
0
;
u32_t
i
;
u32_t
succ_cnt
=
0
;
u32_t
failed_cnt
=
0
;
struct
timespec
start
,
end
;
long
timout_ms
=
0
;
long
timout_ms
;
struct
pollfd
pfd
;
long
rtt
;
int
ret
=
0
;
...
...
components/shell/src/base/shcmd.c
浏览文件 @
23d56f4b
...
...
@@ -190,7 +190,7 @@ LITE_OS_SEC_TEXT_MINOR VOID OsCmdAscendingInsert(CmdItemNode *cmd)
}
for
(
cmdItem
=
LOS_DL_LIST_ENTRY
((
&
cmdInfo
.
cmdList
.
list
)
->
pstPrev
,
CmdItemNode
,
list
);
&
cmdItem
->
list
!=
&
(
cmdInfo
.
cmdList
.
list
);)
{
&
cmdItem
->
list
!=
&
(
cmdInfo
.
cmdList
.
list
);
)
{
cmdNext
=
LOS_DL_LIST_ENTRY
(
cmdItem
->
list
.
pstPrev
,
CmdItemNode
,
list
);
if
(
&
cmdNext
->
list
!=
&
(
cmdInfo
.
cmdList
.
list
))
{
if
((
strncmp
(
cmdItem
->
cmd
->
cmdKey
,
cmd
->
cmd
->
cmdKey
,
strlen
(
cmd
->
cmd
->
cmdKey
))
>=
0
)
&&
...
...
components/shell/src/base/shmsg.c
浏览文件 @
23d56f4b
...
...
@@ -78,7 +78,7 @@ char *GetCmdName(const char *cmdline, unsigned int len)
/* Scan the 'cmdline' string for command */
/* Notice: Command string must not have any special name */
for
(
tmpStr
=
cmdline
,
loop
=
0
;
(
*
tmpStr
!=
'\0'
)
&&
(
loop
<
len
);)
{
for
(
tmpStr
=
cmdline
,
loop
=
0
;
(
*
tmpStr
!=
'\0'
)
&&
(
loop
<
len
);
)
{
/* If reach a double quotes, switch the quotes matching status */
if
(
*
tmpStr
==
'\"'
)
{
SWITCH_QUOTES_STATUS
(
quotes
);
...
...
@@ -114,12 +114,10 @@ int ShellCmdExec(const char *msgName, const char *cmdString)
}
uintRet
=
ShellMsgTypeGet
(
&
cmdParsed
,
msgName
);
if
(
uintRet
!=
LOS_OK
)
{
PRINTK
(
"%s:command not found
\n
"
,
msgName
);
return
-
EFAULT
;
}
else
{
(
void
)
OsCmdExec
(
&
cmdParsed
,
(
char
*
)
cmdString
);
}
return
0
;
...
...
components/shell/src/cmds/fullpath.c
浏览文件 @
23d56f4b
...
...
@@ -88,11 +88,11 @@ static char *StrNormalizePath(char *fullpath)
while
(
*
src
!=
'\0'
)
{
if
(
*
src
==
'.'
)
{
if
(
*
(
src
+
1
)
==
'/'
)
{
src
+=
2
;
src
+=
2
;
/* 2, sizeof "./" */
continue
;
}
else
if
(
*
(
src
+
1
)
==
'.'
)
{
if
((
*
(
src
+
2
)
==
'/'
)
||
(
*
(
src
+
2
)
==
'\0'
))
{
src
+=
2
;
if
((
*
(
src
+
2
)
==
'/'
)
||
(
*
(
src
+
2
)
==
'\0'
))
{
/* 2, 2, offset to check */
src
+=
2
;
/* 2, sizeof offset */
}
else
{
while
((
*
src
!=
'\0'
)
&&
(
*
src
!=
'/'
))
{
*
dest
++
=
*
src
++
;
...
...
@@ -174,7 +174,7 @@ static char *VfsNotAbsolutePath(const char *directory, const char *filename, cha
/* 2: The position of the path character: / and the end character /0 */
if
((
namelen
>
1
)
&&
(
filename
[
0
]
==
'.'
)
&&
(
filename
[
1
]
==
'/'
))
{
filename
+=
2
;
filename
+=
2
;
/* 2, sizeof "./" */
}
fullpath
=
(
char
*
)
malloc
(
strlen
(
directory
)
+
namelen
+
2
);
...
...
@@ -184,8 +184,7 @@ static char *VfsNotAbsolutePath(const char *directory, const char *filename, cha
return
(
char
*
)
NULL
;
}
/* join path and file name */
/* 2, sizeof "./", join path and file name */
ret
=
snprintf_s
(
fullpath
,
strlen
(
directory
)
+
namelen
+
2
,
strlen
(
directory
)
+
namelen
+
1
,
"%s/%s"
,
directory
,
filename
);
if
(
ret
<
0
)
{
...
...
@@ -213,7 +212,6 @@ static char *VfsNormalizeFullpath(const char *directory, const char *filename, c
/* it's a absolute path, use it directly */
fullpath
=
strdup
(
filename
);
/* copy string */
if
(
fullpath
==
NULL
)
{
*
pathname
=
NULL
;
SetErrno
(
ENOMEM
);
...
...
@@ -246,8 +244,7 @@ int VfsNormalizePath(const char *directory, const char *filename, char **pathnam
return
-
EINVAL
;
}
/* 2: The position of the path character: / and the end character /0 */
/* 2, The position of the path character: / and the end character /0 */
if
((
filename
[
0
]
!=
'/'
)
&&
(
strlen
(
directory
)
+
namelen
+
2
>
TEMP_PATH_MAX
))
{
return
-
ENAMETOOLONG
;
}
...
...
kal/cmsis/kal.h
浏览文件 @
23d56f4b
...
...
@@ -50,10 +50,10 @@ extern "C" {
* @version 1.0
*/
typedef
enum
{
/** The timer is not allowed to wake up the RTOS. */
osTimerRousesIgnore
=
0
,
/** The timer is allowed to wake up the RTOS. */
osTimerRousesAllow
=
1
/** The timer is not allowed to wake up the RTOS. */
osTimerRousesIgnore
=
0
,
/** The timer is allowed to wake up the RTOS. */
osTimerRousesAllow
=
1
}
osTimerRouses_t
;
/**
...
...
@@ -61,10 +61,10 @@ typedef enum {
*
*/
typedef
enum
{
/** The timer ignores alignment. */
osTimerAlignIgnore
=
0
,
/** The timer allows alignment. */
osTimerAlignAllow
=
1
/** The timer ignores alignment. */
osTimerAlignIgnore
=
0
,
/** The timer allows alignment. */
osTimerAlignAllow
=
1
}
osTimerAlign_t
;
osTimerId_t
osTimerExtNew
(
osTimerFunc_t
func
,
osTimerType_t
type
,
void
*
argument
,
const
osTimerAttr_t
*
attr
,
...
...
kernel/arch/arm/cortex-m33/gcc/TZ/secure/los_secure_context.h
浏览文件 @
23d56f4b
...
...
@@ -63,5 +63,3 @@ extern VOID HalSecureContextSaveAsm(OsSecureContext *secureContext);
#endif
/* __cplusplus */
#endif
kernel/arch/risc-v/nuclei/gcc/los_context.c
浏览文件 @
23d56f4b
...
...
@@ -30,7 +30,6 @@
extern
VOID
HalHwiInit
(
VOID
);
#define INITIAL_MSTATUS ( MSTATUS_MPP | MSTATUS_MPIE | MSTATUS_FS_INITIAL)
#define ALIGN_DOWN(size, align) ((size) & ~((align) - 1))
#ifdef __cplusplus
...
...
kernel/arch/risc-v/nuclei/gcc/los_interrupt.c
浏览文件 @
23d56f4b
...
...
@@ -71,13 +71,13 @@ LITE_OS_SEC_TEXT_INIT VOID HalHwiInit(VOID)
HWI_PROC_FUNC
handler
,
HWI_ARG_T
arg
)
{
if
(
hwiNum
>
SOC_INT_MAX
){
if
(
hwiNum
>
SOC_INT_MAX
)
{
return
OS_ERRNO_HWI_NUM_INVALID
;
}
if
(
mode
>
ECLIC_VECTOR_INTERRUPT
){
if
(
mode
>
ECLIC_VECTOR_INTERRUPT
)
{
return
OS_ERRNO_HWI_MODE_INVALID
;
}
if
(
arg
>
ECLIC_NEGTIVE_EDGE_TRIGGER
){
if
(
arg
>
ECLIC_NEGTIVE_EDGE_TRIGGER
)
{
return
OS_ERRNO_HWI_ARG_INVALID
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录