Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Kernel Liteos A
提交
fc4c6942
K
Kernel Liteos A
项目概览
OpenHarmony
/
Kernel Liteos A
1 年多 前同步成功
通知
460
Star
414
Fork
55
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
4
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel Liteos A
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
4
Issue
4
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
fc4c6942
编写于
11月 28, 2022
作者:
O
openharmony_ci
提交者:
Gitee
11月 28, 2022
浏览文件
操作
浏览文件
下载
差异文件
!1078 fix: codecheck问题清零
Merge pull request !1078 from zhushengle/codecheck
上级
ead4da80
8d980ded
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
15 addition
and
29 deletion
+15
-29
apps/shell/src/main.c
apps/shell/src/main.c
+8
-10
drivers/block/disk/src/disk.c
drivers/block/disk/src/disk.c
+1
-1
kernel/base/vm/los_vm_dump.c
kernel/base/vm/los_vm_dump.c
+1
-3
kernel/extended/hilog/los_hilog.c
kernel/extended/hilog/los_hilog.c
+2
-8
net/lwip-2.1/enhancement/src/api_shell.c
net/lwip-2.1/enhancement/src/api_shell.c
+3
-7
未找到文件。
apps/shell/src/main.c
浏览文件 @
fc4c6942
...
@@ -49,7 +49,7 @@ ShellCB *OsGetShellCb()
...
@@ -49,7 +49,7 @@ ShellCB *OsGetShellCb()
return
g_shellCB
;
return
g_shellCB
;
}
}
void
ShellDeinit
(
ShellCB
*
shellCB
)
static
void
ShellDeinit
(
ShellCB
*
shellCB
)
{
{
(
void
)
pthread_mutex_destroy
(
&
shellCB
->
historyMutex
);
(
void
)
pthread_mutex_destroy
(
&
shellCB
->
historyMutex
);
(
void
)
pthread_mutex_destroy
(
&
shellCB
->
keyMutex
);
(
void
)
pthread_mutex_destroy
(
&
shellCB
->
keyMutex
);
...
@@ -65,27 +65,23 @@ static int OsShellCreateTask(ShellCB *shellCB)
...
@@ -65,27 +65,23 @@ static int OsShellCreateTask(ShellCB *shellCB)
ret
=
sched_getparam
(
getpid
(),
&
param
);
ret
=
sched_getparam
(
getpid
(),
&
param
);
if
(
ret
!=
SH_OK
)
{
if
(
ret
!=
SH_OK
)
{
goto
OUT
;
return
ret
;
}
}
param
.
sched_priority
=
SHELL_PROCESS_PRIORITY_INIT
;
param
.
sched_priority
=
SHELL_PROCESS_PRIORITY_INIT
;
ret
=
sched_setparam
(
getpid
(),
&
param
);
ret
=
sched_setparam
(
getpid
(),
&
param
);
if
(
ret
!=
SH_OK
)
{
if
(
ret
!=
SH_OK
)
{
goto
OUT
;
return
ret
;
}
}
ret
=
ShellTaskInit
(
shellCB
);
ret
=
ShellTaskInit
(
shellCB
);
if
(
ret
!=
SH_OK
)
{
if
(
ret
!=
SH_OK
)
{
goto
OUT
;
return
ret
;
}
}
shellCB
->
shellEntryHandle
=
pthread_self
();
shellCB
->
shellEntryHandle
=
pthread_self
();
return
0
;
return
0
;
OUT:
ShellDeinit
(
shellCB
);
return
ret
;
}
}
static
int
DoShellExec
(
char
**
argv
)
static
int
DoShellExec
(
char
**
argv
)
...
@@ -148,7 +144,7 @@ int main(int argc, char **argv)
...
@@ -148,7 +144,7 @@ int main(int argc, char **argv)
shellCB
=
(
ShellCB
*
)
malloc
(
sizeof
(
ShellCB
));
shellCB
=
(
ShellCB
*
)
malloc
(
sizeof
(
ShellCB
));
if
(
shellCB
==
NULL
)
{
if
(
shellCB
==
NULL
)
{
goto
ERR_OUT1
;
return
SH_NOK
;
}
}
ret
=
memset_s
(
shellCB
,
sizeof
(
ShellCB
),
0
,
sizeof
(
ShellCB
));
ret
=
memset_s
(
shellCB
,
sizeof
(
ShellCB
),
0
,
sizeof
(
ShellCB
));
if
(
ret
!=
SH_OK
)
{
if
(
ret
!=
SH_OK
)
{
...
@@ -176,7 +172,9 @@ int main(int argc, char **argv)
...
@@ -176,7 +172,9 @@ int main(int argc, char **argv)
g_shellCB
=
shellCB
;
g_shellCB
=
shellCB
;
ret
=
OsShellCreateTask
(
shellCB
);
ret
=
OsShellCreateTask
(
shellCB
);
if
(
ret
!=
SH_OK
)
{
if
(
ret
!=
SH_OK
)
{
goto
ERR_OUT3
;
ShellDeinit
(
shellCB
);
g_shellCB
=
NULL
;
return
ret
;
}
}
ShellEntry
(
shellCB
);
ShellEntry
(
shellCB
);
...
...
drivers/block/disk/src/disk.c
浏览文件 @
fc4c6942
...
@@ -1465,7 +1465,7 @@ INT32 los_disk_init(const CHAR *diskName, const struct block_operations *bops,
...
@@ -1465,7 +1465,7 @@ INT32 los_disk_init(const CHAR *diskName, const struct block_operations *bops,
ret
=
VnodeLookup
(
diskName
,
&
blkDriver
,
0
);
ret
=
VnodeLookup
(
diskName
,
&
blkDriver
,
0
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
VnodeDrop
();
VnodeDrop
();
ret
=
ENOENT
;
PRINT_ERR
(
"disk_init : %s, failed to find the vnode, ERRNO=%d
\n
"
,
diskName
,
ret
)
;
goto
DISK_FIND_ERROR
;
goto
DISK_FIND_ERROR
;
}
}
struct
block_operations
*
bops2
=
(
struct
block_operations
*
)((
struct
drv_data
*
)
blkDriver
->
data
)
->
ops
;
struct
block_operations
*
bops2
=
(
struct
block_operations
*
)((
struct
drv_data
*
)
blkDriver
->
data
)
->
ops
;
...
...
kernel/base/vm/los_vm_dump.c
浏览文件 @
fc4c6942
...
@@ -146,7 +146,6 @@ UINT32 OsKProcessPmUsage(LosVmSpace *kSpace, UINT32 *actualPm)
...
@@ -146,7 +146,6 @@ UINT32 OsKProcessPmUsage(LosVmSpace *kSpace, UINT32 *actualPm)
LosVmSpace
*
space
=
NULL
;
LosVmSpace
*
space
=
NULL
;
LOS_DL_LIST
*
spaceList
=
NULL
;
LOS_DL_LIST
*
spaceList
=
NULL
;
UINT32
UProcessUsed
=
0
;
UINT32
UProcessUsed
=
0
;
UINT32
pmTmp
;
if
(
actualPm
==
NULL
)
{
if
(
actualPm
==
NULL
)
{
return
0
;
return
0
;
...
@@ -167,8 +166,7 @@ UINT32 OsKProcessPmUsage(LosVmSpace *kSpace, UINT32 *actualPm)
...
@@ -167,8 +166,7 @@ UINT32 OsKProcessPmUsage(LosVmSpace *kSpace, UINT32 *actualPm)
if
(
space
==
LOS_GetKVmSpace
())
{
if
(
space
==
LOS_GetKVmSpace
())
{
continue
;
continue
;
}
}
(
VOID
)
OsUProcessPmUsage
(
space
,
NULL
,
&
pmTmp
);
UProcessUsed
+=
OsUProcessPmUsage
(
space
,
NULL
,
NULL
);
UProcessUsed
+=
pmTmp
;
}
}
(
VOID
)
LOS_MuxRelease
(
vmSpaceListMux
);
(
VOID
)
LOS_MuxRelease
(
vmSpaceListMux
);
...
...
kernel/extended/hilog/los_hilog.c
浏览文件 @
fc4c6942
...
@@ -233,14 +233,8 @@ static int HiLogWriteRingBuffer(unsigned char *buffer, size_t bufLen)
...
@@ -233,14 +233,8 @@ static int HiLogWriteRingBuffer(unsigned char *buffer, size_t bufLen)
static
void
HiLogHeadInit
(
struct
HiLogEntry
*
header
,
size_t
len
)
static
void
HiLogHeadInit
(
struct
HiLogEntry
*
header
,
size_t
len
)
{
{
struct
timespec
now
;
struct
timespec
now
=
{
0
};
int
ret
;
(
void
)
clock_gettime
(
CLOCK_REALTIME
,
&
now
);
ret
=
clock_gettime
(
CLOCK_REALTIME
,
&
now
);
if
(
ret
!=
0
)
{
PRINTK
(
"In %s line %d,clock_gettime fail
\n
"
,
__FUNCTION__
,
__LINE__
);
return
;
}
header
->
len
=
len
;
header
->
len
=
len
;
header
->
pid
=
LOS_GetCurrProcessID
();
header
->
pid
=
LOS_GetCurrProcessID
();
...
...
net/lwip-2.1/enhancement/src/api_shell.c
浏览文件 @
fc4c6942
...
@@ -2175,8 +2175,6 @@ u32_t osShellPing6(int argc, const char **argv)
...
@@ -2175,8 +2175,6 @@ u32_t osShellPing6(int argc, const char **argv)
/* Setting the start time of the entire ping task for statistics */
/* Setting the start time of the entire ping task for statistics */
(
void
)
clock_gettime
(
CLOCK_MONOTONIC_RAW
,
&
first
);
(
void
)
clock_gettime
(
CLOCK_MONOTONIC_RAW
,
&
first
);
nsent
=
0
;
for
(
nsent
=
0
;
nsent
<
ping6_params
.
pingcount
;
nsent
++
)
{
for
(
nsent
=
0
;
nsent
<
ping6_params
.
pingcount
;
nsent
++
)
{
/* capture the start tick to calculate rtt */
/* capture the start tick to calculate rtt */
(
void
)
clock_gettime
(
CLOCK_MONOTONIC_RAW
,
&
start
);
(
void
)
clock_gettime
(
CLOCK_MONOTONIC_RAW
,
&
start
);
...
@@ -3170,7 +3168,6 @@ void netstat_internal(void *ctx)
...
@@ -3170,7 +3168,6 @@ void netstat_internal(void *ctx)
}
}
/* For listen PCBs */
/* For listen PCBs */
recvQlen
=
0
;
sendQlen
=
0
;
sendQlen
=
0
;
for
(
lpcb
=
tcp_listen_pcbs
.
listen_pcbs
;
lpcb
!=
NULL
;
lpcb
=
lpcb
->
next
)
{
for
(
lpcb
=
tcp_listen_pcbs
.
listen_pcbs
;
lpcb
!=
NULL
;
lpcb
=
lpcb
->
next
)
{
...
@@ -3670,7 +3667,7 @@ u32_t netdebug_sock(int argc, const char **argv)
...
@@ -3670,7 +3667,7 @@ u32_t netdebug_sock(int argc, const char **argv)
int
idx
;
int
idx
;
u32_t
ret
=
LOS_NOK
;
u32_t
ret
=
LOS_NOK
;
if
(
argc
==
2
)
{
if
(
argc
==
2
)
{
/* 2: Number of command parameters */
if
(
!
strcmp
(
"-i"
,
argv
[
1
]))
{
if
(
!
strcmp
(
"-i"
,
argv
[
1
]))
{
/* netdebug sock -i */
/* netdebug sock -i */
for
(
idx
=
0
;
idx
<
(
int
)
LWIP_CONFIG_NUM_SOCKETS
;
idx
++
)
{
for
(
idx
=
0
;
idx
<
(
int
)
LWIP_CONFIG_NUM_SOCKETS
;
idx
++
)
{
...
@@ -3678,10 +3675,9 @@ u32_t netdebug_sock(int argc, const char **argv)
...
@@ -3678,10 +3675,9 @@ u32_t netdebug_sock(int argc, const char **argv)
}
}
ret
=
LOS_OK
;
ret
=
LOS_OK
;
}
}
}
else
if
(
argc
==
3
)
{
}
else
if
(
argc
==
3
)
{
/* 3: Number of command parameters */
if
(
!
strcmp
(
"-d"
,
argv
[
1
]))
{
if
(
!
strcmp
(
"-d"
,
argv
[
1
]))
{
/* netdebug sock -d <idx> */
idx
=
atoi
(
argv
[
2
]);
/* 2: netdebug sock -d <idx> */
idx
=
atoi
(
argv
[
2
]);
if
(
idx
>=
0
)
{
if
(
idx
>=
0
)
{
debug_socket_info
(
idx
,
1
,
1
);
debug_socket_info
(
idx
,
1
,
1
);
ret
=
LOS_OK
;
ret
=
LOS_OK
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录