Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
3c098ca8
S
Startup Init Lite
项目概览
OpenHarmony
/
Startup Init Lite
1 年多 前同步成功
通知
3
Star
37
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Startup Init Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
3c098ca8
编写于
6月 27, 2023
作者:
O
openharmony_ci
提交者:
Gitee
6月 27, 2023
浏览文件
操作
浏览文件
下载
差异文件
!2067 fix coding styles
Merge pull request !2067 from handy/0627
上级
8f561f00
f710131b
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
24 addition
and
24 deletion
+24
-24
interfaces/innerkits/fs_manager/libfs_hvb/fs_hvb.c
interfaces/innerkits/fs_manager/libfs_hvb/fs_hvb.c
+1
-1
interfaces/innerkits/syspara/param_comm.c
interfaces/innerkits/syspara/param_comm.c
+5
-5
interfaces/innerkits/syspara/param_comm.h
interfaces/innerkits/syspara/param_comm.h
+1
-1
services/begetctl/misc_daemon.cpp
services/begetctl/misc_daemon.cpp
+1
-1
services/include/init_utils.h
services/include/init_utils.h
+3
-3
services/param/manager/param_server.c
services/param/manager/param_server.c
+9
-9
services/utils/init_utils.c
services/utils/init_utils.c
+4
-4
未找到文件。
interfaces/innerkits/fs_manager/libfs_hvb/fs_hvb.c
浏览文件 @
3c098ca8
...
...
@@ -379,7 +379,7 @@ int FsHvbConstructVerityTarget(DmVerityTarget *target, const char *devName, stru
}
if
(
snprintf_s
(
&
devPath
[
0
],
sizeof
(
devPath
),
sizeof
(
devPath
)
-
1
,
"%s%s"
,
((
strchr
(
devName
"/"
)
==
NULL
)
?
FS_HVB_PARTITION_PREFIX
:
""
),
devName
)
==
-
1
)
{
((
strchr
(
devName
,
'/'
)
==
NULL
)
?
FS_HVB_PARTITION_PREFIX
:
""
),
devName
)
==
-
1
)
{
BEGET_LOGE
(
"error, snprintf_s devPath"
);
return
-
1
;
}
...
...
interfaces/innerkits/syspara/param_comm.c
浏览文件 @
3c098ca8
...
...
@@ -85,7 +85,7 @@ INIT_LOCAL_API int GetParameter_(const char *key, const char *def, char *value,
return
GetSystemError
(
ret
);
}
static
PropertyValueProcessor
propertyGetProcessor
=
NULL
;
static
PropertyValueProcessor
g_
propertyGetProcessor
=
NULL
;
INIT_LOCAL_API
const
char
*
GetProperty
(
const
char
*
key
,
const
char
**
paramHolder
)
{
...
...
@@ -103,8 +103,8 @@ INIT_LOCAL_API const char *GetProperty(const char *key, const char **paramHolder
free
(
res
);
return
NULL
;
}
if
(
propertyGetProcessor
!=
NULL
)
{
res
=
propertyGetProcessor
(
key
,
res
);
if
(
g_
propertyGetProcessor
!=
NULL
)
{
res
=
g_
propertyGetProcessor
(
key
,
res
);
}
*
paramHolder
=
res
;
}
...
...
@@ -113,8 +113,8 @@ INIT_LOCAL_API const char *GetProperty(const char *key, const char **paramHolder
INIT_LOCAL_API
PropertyValueProcessor
SetPropertyGetProcessor
(
PropertyValueProcessor
processor
)
{
PropertyValueProcessor
prev
=
propertyGetProcessor
;
propertyGetProcessor
=
processor
;
PropertyValueProcessor
prev
=
g_
propertyGetProcessor
;
g_
propertyGetProcessor
=
processor
;
return
prev
;
}
...
...
interfaces/innerkits/syspara/param_comm.h
浏览文件 @
3c098ca8
...
...
@@ -30,7 +30,7 @@ extern "C" {
#define DEV_BUF_LENGTH 3
#define DEV_BUF_MAX_LENGTH 1024
typedef
char
*
(
*
PropertyValueProcessor
)(
const
char
*
key
,
char
*
value
);
typedef
char
*
(
*
PropertyValueProcessor
)(
const
char
*
key
,
char
*
value
);
INIT_LOCAL_API
const
char
*
GetProperty
(
const
char
*
key
,
const
char
**
paramHolder
);
INIT_LOCAL_API
PropertyValueProcessor
SetPropertyGetProcessor
(
PropertyValueProcessor
processor
);
...
...
services/begetctl/misc_daemon.cpp
浏览文件 @
3c098ca8
...
...
@@ -55,7 +55,7 @@ static void ClearLogo(int fd)
}
static
void
WriteLogoContent
(
int
fd
,
const
std
::
string
&
logoPath
,
uint32_t
size
)
{
{
if
(
size
==
0
||
size
>
MAX_LOGO_SIZE
)
{
BSH_LOGE
(
"logo size is invalid!"
);
return
;
...
...
services/include/init_utils.h
浏览文件 @
3c098ca8
...
...
@@ -61,11 +61,11 @@ char *ReadFileToBuf(const char *configFile);
int
GetProcCmdlineValue
(
const
char
*
name
,
const
char
*
buffer
,
char
*
value
,
int
length
);
char
*
ReadFileData
(
const
char
*
fileName
);
typedef
struct
tagNAME_VALUE_PAIR
{
typedef
struct
NameValuePair
{
const
char
*
name
;
const
char
*
name
_e
nd
;
const
char
*
name
E
nd
;
const
char
*
value
;
const
char
*
value
_e
nd
;
const
char
*
value
E
nd
;
}
NAME_VALUE_PAIR
;
int
IterateNameValuePairs
(
const
char
*
src
,
void
(
*
iterator
)(
const
NAME_VALUE_PAIR
*
nv
,
void
*
context
),
void
*
context
);
...
...
services/param/manager/param_server.c
浏览文件 @
3c098ca8
...
...
@@ -36,15 +36,15 @@
#define OHOS_CMDLINE_PARA_PREFIX "ohos.boot."
#define OHOS_CMDLINE_PARA_PREFIX_LEN 10
typedef
struct
c
mdLineInfo
{
typedef
struct
C
mdLineInfo
{
const
char
*
name
;
int
(
*
processor
)(
const
char
*
name
,
const
char
*
value
);
}
c
mdLineInfo
;
}
C
mdLineInfo
;
typedef
struct
c
mdLineIteratorCtx
{
typedef
struct
C
mdLineIteratorCtx
{
char
*
cmdline
;
bool
gotSn
;
}
c
mdLineIteratorCtx
;
}
C
mdLineIteratorCtx
;
static
int
CommonDealFun
(
const
char
*
name
,
const
char
*
value
)
{
...
...
@@ -109,9 +109,9 @@ static void CmdlineIterator(const NAME_VALUE_PAIR *nv, void *context)
const
char
*
name
;
const
char
*
matched
;
char
fullName
[
PARAM_NAME_LEN_MAX
];
cmdLineIteratorCtx
*
ctx
=
(
c
mdLineIteratorCtx
*
)
context
;
CmdLineIteratorCtx
*
ctx
=
(
C
mdLineIteratorCtx
*
)
context
;
char
*
data
=
(
char
*
)
ctx
->
cmdline
;
static
const
c
mdLineInfo
CMDLINES
[]
=
{
static
const
C
mdLineInfo
CMDLINES
[]
=
{
{
"hardware"
,
CommonDealFun
},
{
"bootgroup"
,
CommonDealFun
},
{
"reboot_reason"
,
CommonDealFun
},
...
...
@@ -121,8 +121,8 @@ static void CmdlineIterator(const NAME_VALUE_PAIR *nv, void *context)
{
"serialno"
,
SnDealFun
}
};
data
[
nv
->
name
_e
nd
-
data
]
=
'\0'
;
data
[
nv
->
value
_e
nd
-
data
]
=
'\0'
;
data
[
nv
->
name
E
nd
-
data
]
=
'\0'
;
data
[
nv
->
value
E
nd
-
data
]
=
'\0'
;
PARAM_LOGV
(
"proc cmdline: name [%s], value [%s]"
,
nv
->
name
,
nv
->
value
);
// Get name without prefix
...
...
@@ -185,7 +185,7 @@ static void GenerateSnByDefault(void)
INIT_LOCAL_API
int
LoadParamFromCmdLine
(
void
)
{
c
mdLineIteratorCtx
ctx
;
C
mdLineIteratorCtx
ctx
;
ctx
.
gotSn
=
false
;
ctx
.
cmdline
=
ReadFileData
(
BOOT_CMD_LINE
);
...
...
services/utils/init_utils.c
浏览文件 @
3c098ca8
...
...
@@ -217,10 +217,10 @@ int IterateNameValuePairs(const char *src, void (*iterator)(const NAME_VALUE_PAI
seperator
=
strchr
(
src
,
' '
);
if
(
seperator
==
NULL
)
{
// Last nv
nv
.
value
_e
nd
=
src
+
strlen
(
src
);
nv
.
value
E
nd
=
src
+
strlen
(
src
);
src
=
NULL
;
}
else
{
nv
.
value
_e
nd
=
seperator
;
nv
.
value
E
nd
=
seperator
;
src
=
seperator
+
1
;
}
...
...
@@ -230,11 +230,11 @@ int IterateNameValuePairs(const char *src, void (*iterator)(const NAME_VALUE_PAI
// Invalid name value pair
continue
;
}
if
(
seperator
>
nv
.
value
_e
nd
)
{
if
(
seperator
>
nv
.
value
E
nd
)
{
// name without value, just ignore
continue
;
}
nv
.
name
_e
nd
=
seperator
;
nv
.
name
E
nd
=
seperator
;
nv
.
value
=
seperator
+
1
;
iterator
(
&
nv
,
context
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录