Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Kernel Liteos A
提交
1a3f3f54
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看板
提交
1a3f3f54
编写于
6月 08, 2021
作者:
O
openharmony_ci
提交者:
Gitee
6月 08, 2021
浏览文件
操作
浏览文件
下载
差异文件
!302 fix: Codex告警清零
Merge pull request !302 from Far/master
上级
7d100571
b5370af8
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
27 addition
and
12 deletion
+27
-12
apps/init/src/init.c
apps/init/src/init.c
+8
-2
apps/shell/src/shmsg.c
apps/shell/src/shmsg.c
+8
-2
arch/arm/arm/src/include/los_hw_pri.h
arch/arm/arm/src/include/los_hw_pri.h
+1
-1
arch/arm/arm/src/los_hw.c
arch/arm/arm/src/los_hw.c
+1
-1
fs/vfs/disk/disk.c
fs/vfs/disk/disk.c
+6
-3
kernel/common/console.c
kernel/common/console.c
+3
-3
未找到文件。
apps/init/src/init.c
浏览文件 @
1a3f3f54
...
@@ -49,6 +49,7 @@
...
@@ -49,6 +49,7 @@
int
main
(
int
argc
,
char
*
const
*
argv
)
int
main
(
int
argc
,
char
*
const
*
argv
)
{
{
int
ret
;
int
ret
;
pid_t
gid
;
const
char
*
shellPath
=
"/bin/mksh"
;
const
char
*
shellPath
=
"/bin/mksh"
;
#ifdef LOSCFG_QUICK_START
#ifdef LOSCFG_QUICK_START
...
@@ -74,9 +75,14 @@ int main(int argc, char * const *argv)
...
@@ -74,9 +75,14 @@ int main(int argc, char * const *argv)
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
printf
(
"Failed to fork for shell
\n
"
);
printf
(
"Failed to fork for shell
\n
"
);
}
else
if
(
ret
==
0
)
{
}
else
if
(
ret
==
0
)
{
ret
=
tcsetpgrp
(
STDIN_FILENO
,
getpgrp
());
gid
=
getpgrp
();
if
(
gid
<
0
)
{
printf
(
"get group id failed, pgrpid %d, errno %d
\n
"
,
gid
,
errno
);
exit
(
0
);
}
ret
=
tcsetpgrp
(
STDIN_FILENO
,
gid
);
if
(
ret
!=
0
)
{
if
(
ret
!=
0
)
{
printf
(
"tcsetpgrp failed,
pgrpid %d, errno %d
\n
"
,
getpgrp
()
,
errno
);
printf
(
"tcsetpgrp failed,
errno %d
\n
"
,
errno
);
exit
(
0
);
exit
(
0
);
}
}
(
void
)
execve
(
shellPath
,
NULL
,
NULL
);
(
void
)
execve
(
shellPath
,
NULL
,
NULL
);
...
...
apps/shell/src/shmsg.c
浏览文件 @
1a3f3f54
...
@@ -333,6 +333,7 @@ static void DoCmdExec(const char *cmdName, const char *cmdline, unsigned int len
...
@@ -333,6 +333,7 @@ static void DoCmdExec(const char *cmdName, const char *cmdline, unsigned int len
{
{
int
ret
;
int
ret
;
pid_t
forkPid
;
pid_t
forkPid
;
pid_t
gid
;
if
(
strncmp
(
cmdline
,
SHELL_EXEC_COMMAND
,
SHELL_EXEC_COMMAND_BYTES
)
==
0
)
{
if
(
strncmp
(
cmdline
,
SHELL_EXEC_COMMAND
,
SHELL_EXEC_COMMAND_BYTES
)
==
0
)
{
forkPid
=
fork
();
forkPid
=
fork
();
...
@@ -345,9 +346,14 @@ static void DoCmdExec(const char *cmdName, const char *cmdline, unsigned int len
...
@@ -345,9 +346,14 @@ static void DoCmdExec(const char *cmdName, const char *cmdline, unsigned int len
exit
(
1
);
exit
(
1
);
}
}
ret
=
tcsetpgrp
(
STDIN_FILENO
,
getpgrp
());
gid
=
getpgrp
();
if
(
gid
<
0
)
{
printf
(
"get group id failed, pgrpid %d, errno %d
\n
"
,
gid
,
errno
);
}
ret
=
tcsetpgrp
(
STDIN_FILENO
,
gid
);
if
(
ret
!=
0
)
{
if
(
ret
!=
0
)
{
printf
(
"tcsetpgrp failed,
pgrpid %d, errno %d
\n
"
,
getpgrp
()
,
errno
);
printf
(
"tcsetpgrp failed,
errno %d
\n
"
,
errno
);
}
}
ret
=
execve
((
const
char
*
)
cmdParsed
->
paramArray
[
0
],
(
char
*
const
*
)
cmdParsed
->
paramArray
,
NULL
);
ret
=
execve
((
const
char
*
)
cmdParsed
->
paramArray
[
0
],
(
char
*
const
*
)
cmdParsed
->
paramArray
,
NULL
);
...
...
arch/arm/arm/src/include/los_hw_pri.h
浏览文件 @
1a3f3f54
...
@@ -104,7 +104,7 @@ typedef struct {
...
@@ -104,7 +104,7 @@ typedef struct {
extern
VOID
*
OsTaskStackInit
(
UINT32
taskID
,
UINT32
stackSize
,
VOID
*
topStack
,
BOOL
initFlag
);
extern
VOID
*
OsTaskStackInit
(
UINT32
taskID
,
UINT32
stackSize
,
VOID
*
topStack
,
BOOL
initFlag
);
extern
VOID
OsUserCloneParentStack
(
VOID
*
childStack
,
UINTPTR
parentTopOfStask
,
UINT32
parentStackSize
);
extern
VOID
OsUserCloneParentStack
(
VOID
*
childStack
,
UINTPTR
parentTopOfStask
,
UINT32
parentStackSize
);
extern
VOID
OsUserTaskStackInit
(
TaskContext
*
context
,
UINTPTR
taskEntry
,
UINTPTR
stack
);
extern
VOID
OsUserTaskStackInit
(
TaskContext
*
context
,
UINTPTR
taskEntry
,
UINTPTR
stack
);
extern
VOID
OsInitSignalContext
(
VOID
*
sp
,
VOID
*
signalContext
,
UINTPTR
sigHandler
,
UINT32
signo
,
UINT32
param
);
extern
VOID
OsInitSignalContext
(
const
VOID
*
sp
,
VOID
*
signalContext
,
UINTPTR
sigHandler
,
UINT32
signo
,
UINT32
param
);
extern
void
arm_clean_cache_range
(
UINTPTR
start
,
UINTPTR
end
);
extern
void
arm_clean_cache_range
(
UINTPTR
start
,
UINTPTR
end
);
extern
void
arm_inv_cache_range
(
UINTPTR
start
,
UINTPTR
end
);
extern
void
arm_inv_cache_range
(
UINTPTR
start
,
UINTPTR
end
);
...
...
arch/arm/arm/src/los_hw.c
浏览文件 @
1a3f3f54
...
@@ -126,7 +126,7 @@ LITE_OS_SEC_TEXT_INIT VOID OsUserTaskStackInit(TaskContext *context, UINTPTR tas
...
@@ -126,7 +126,7 @@ LITE_OS_SEC_TEXT_INIT VOID OsUserTaskStackInit(TaskContext *context, UINTPTR tas
context
->
PC
=
(
UINTPTR
)
taskEntry
;
context
->
PC
=
(
UINTPTR
)
taskEntry
;
}
}
VOID
OsInitSignalContext
(
VOID
*
sp
,
VOID
*
signalContext
,
UINTPTR
sigHandler
,
UINT32
signo
,
UINT32
param
)
VOID
OsInitSignalContext
(
const
VOID
*
sp
,
VOID
*
signalContext
,
UINTPTR
sigHandler
,
UINT32
signo
,
UINT32
param
)
{
{
IrqContext
*
newSp
=
(
IrqContext
*
)
signalContext
;
IrqContext
*
newSp
=
(
IrqContext
*
)
signalContext
;
(
VOID
)
memcpy_s
(
signalContext
,
sizeof
(
IrqContext
),
sp
,
sizeof
(
IrqContext
));
(
VOID
)
memcpy_s
(
signalContext
,
sizeof
(
IrqContext
),
sp
,
sizeof
(
IrqContext
));
...
...
fs/vfs/disk/disk.c
浏览文件 @
1a3f3f54
...
@@ -865,7 +865,7 @@ INT32 los_disk_write(INT32 drvID, const VOID *buf, UINT64 sector, UINT32 count)
...
@@ -865,7 +865,7 @@ INT32 los_disk_write(INT32 drvID, const VOID *buf, UINT64 sector, UINT32 count)
#endif
#endif
INT32
result
=
VFS_ERROR
;
INT32
result
=
VFS_ERROR
;
los_disk
*
disk
=
get_disk
(
drvID
);
los_disk
*
disk
=
get_disk
(
drvID
);
if
(
disk
==
NULL
)
{
if
(
disk
==
NULL
||
disk
->
dev
==
NULL
||
disk
->
dev
->
data
==
NULL
)
{
return
result
;
return
result
;
}
}
...
@@ -896,7 +896,7 @@ INT32 los_disk_write(INT32 drvID, const VOID *buf, UINT64 sector, UINT32 count)
...
@@ -896,7 +896,7 @@ INT32 los_disk_write(INT32 drvID, const VOID *buf, UINT64 sector, UINT32 count)
}
else
{
}
else
{
#endif
#endif
struct
block_operations
*
bops
=
(
struct
block_operations
*
)((
struct
drv_data
*
)
disk
->
dev
->
data
)
->
ops
;
struct
block_operations
*
bops
=
(
struct
block_operations
*
)((
struct
drv_data
*
)
disk
->
dev
->
data
)
->
ops
;
if
((
disk
->
dev
!=
NULL
)
&&
(
bops
!=
NULL
)
&&
(
bops
->
write
!=
NULL
))
{
if
((
bops
!=
NULL
)
&&
(
bops
->
write
!=
NULL
))
{
result
=
bops
->
write
(
disk
->
dev
,
(
UINT8
*
)
buf
,
sector
,
count
);
result
=
bops
->
write
(
disk
->
dev
,
(
UINT8
*
)
buf
,
sector
,
count
);
if
(
result
==
(
INT32
)
count
)
{
if
(
result
==
(
INT32
)
count
)
{
result
=
ENOERR
;
result
=
ENOERR
;
...
@@ -1151,6 +1151,9 @@ INT32 los_disk_cache_clear(INT32 drvID)
...
@@ -1151,6 +1151,9 @@ INT32 los_disk_cache_clear(INT32 drvID)
los_part
*
part
=
get_part
(
drvID
);
los_part
*
part
=
get_part
(
drvID
);
los_disk
*
disk
=
NULL
;
los_disk
*
disk
=
NULL
;
if
(
part
==
NULL
)
{
return
VFS_ERROR
;
}
result
=
OsSdSync
(
part
->
disk_id
);
result
=
OsSdSync
(
part
->
disk_id
);
if
(
result
!=
0
)
{
if
(
result
!=
0
)
{
PRINTK
(
"[ERROR]disk_cache_clear SD sync failed!
\n
"
);
PRINTK
(
"[ERROR]disk_cache_clear SD sync failed!
\n
"
);
...
@@ -1159,7 +1162,7 @@ INT32 los_disk_cache_clear(INT32 drvID)
...
@@ -1159,7 +1162,7 @@ INT32 los_disk_cache_clear(INT32 drvID)
disk
=
get_disk
(
part
->
disk_id
);
disk
=
get_disk
(
part
->
disk_id
);
if
(
disk
==
NULL
)
{
if
(
disk
==
NULL
)
{
return
-
1
;
return
VFS_ERROR
;
}
}
DISK_LOCK
(
&
disk
->
disk_mutex
);
DISK_LOCK
(
&
disk
->
disk_mutex
);
...
...
kernel/common/console.c
浏览文件 @
1a3f3f54
...
@@ -171,7 +171,7 @@ BOOL IsConsoleOccupied(const CONSOLE_CB *consoleCB)
...
@@ -171,7 +171,7 @@ BOOL IsConsoleOccupied(const CONSOLE_CB *consoleCB)
STATIC
INT32
ConsoleCtrlCaptureLine
(
CONSOLE_CB
*
consoleCB
)
STATIC
INT32
ConsoleCtrlCaptureLine
(
CONSOLE_CB
*
consoleCB
)
{
{
struct
termios
consoleTermios
;
struct
termios
consoleTermios
=
{
0
}
;
UINT32
intSave
;
UINT32
intSave
;
LOS_SpinLockSave
(
&
g_consoleSpin
,
&
intSave
);
LOS_SpinLockSave
(
&
g_consoleSpin
,
&
intSave
);
...
@@ -185,7 +185,7 @@ STATIC INT32 ConsoleCtrlCaptureLine(CONSOLE_CB *consoleCB)
...
@@ -185,7 +185,7 @@ STATIC INT32 ConsoleCtrlCaptureLine(CONSOLE_CB *consoleCB)
STATIC
INT32
ConsoleCtrlCaptureChar
(
CONSOLE_CB
*
consoleCB
)
STATIC
INT32
ConsoleCtrlCaptureChar
(
CONSOLE_CB
*
consoleCB
)
{
{
struct
termios
consoleTermios
;
struct
termios
consoleTermios
=
{
0
}
;
UINT32
intSave
;
UINT32
intSave
;
LOS_SpinLockSave
(
&
g_consoleSpin
,
&
intSave
);
LOS_SpinLockSave
(
&
g_consoleSpin
,
&
intSave
);
...
@@ -1014,7 +1014,7 @@ STATIC const struct file_operations_vfs g_consoleDevOps = {
...
@@ -1014,7 +1014,7 @@ STATIC const struct file_operations_vfs g_consoleDevOps = {
STATIC
VOID
OsConsoleTermiosInit
(
CONSOLE_CB
*
consoleCB
,
const
CHAR
*
deviceName
)
STATIC
VOID
OsConsoleTermiosInit
(
CONSOLE_CB
*
consoleCB
,
const
CHAR
*
deviceName
)
{
{
struct
termios
consoleTermios
;
struct
termios
consoleTermios
=
{
0
}
;
if
((
deviceName
!=
NULL
)
&&
if
((
deviceName
!=
NULL
)
&&
(
strlen
(
deviceName
)
==
strlen
(
SERIAL
))
&&
(
strlen
(
deviceName
)
==
strlen
(
SERIAL
))
&&
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录