Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-RAN
Commits
b9fd5a6f
Commit
b9fd5a6f
authored
Mar 14, 2024
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config module: make it less verbose
parent
006b68fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
9 deletions
+13
-9
common/config/config_load_configmodule.c
common/config/config_load_configmodule.c
+5
-3
common/config/libconfig/config_libconfig.c
common/config/libconfig/config_libconfig.c
+8
-6
No files found.
common/config/config_load_configmodule.c
View file @
b9fd5a6f
...
@@ -208,9 +208,11 @@ int config_cmdlineonly_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions
...
@@ -208,9 +208,11 @@ int config_cmdlineonly_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions
}
}
}
/* for loop on options */
}
/* for loop on options */
printf
(
"[CONFIG] %s: %i/%i parameters successfully set
\n
"
,
printf_params
(
cfg
,
((
prefix
==
NULL
)
?
"(root)"
:
prefix
),
"[CONFIG] %s: %i/%i parameters successfully set
\n
"
,
numdefvals
,
numoptions
);
prefix
==
NULL
?
"(root)"
:
prefix
,
numdefvals
,
numoptions
);
if
(
fatalerror
==
1
)
{
if
(
fatalerror
==
1
)
{
fprintf
(
stderr
,
"[CONFIG] fatal errors found when assigning %s parameters
\n
"
,
fprintf
(
stderr
,
"[CONFIG] fatal errors found when assigning %s parameters
\n
"
,
...
...
common/config/libconfig/config_libconfig.c
View file @
b9fd5a6f
...
@@ -70,7 +70,7 @@ int read_strlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, config_s
...
@@ -70,7 +70,7 @@ int read_strlist(configmodule_interface_t *cfg, paramdef_t *cfgoptions, config_s
str
=
config_setting_get_string_elem
(
setting
,
i
);
str
=
config_setting_get_string_elem
(
setting
,
i
);
if
(
str
==
NULL
)
{
if
(
str
==
NULL
)
{
printf
(
"[LIBCONFIG] %s%i not found in config file
\n
"
,
cfgoptions
->
optname
,
i
);
printf
_params
(
cfg
,
"[LIBCONFIG] %s%i not found in config file
\n
"
,
cfgoptions
->
optname
,
i
);
}
else
{
}
else
{
snprintf
(
cfgoptions
->
strlistptr
[
i
],
DEFAULT_EXTRA_SZ
,
"%s"
,
str
);
snprintf
(
cfgoptions
->
strlistptr
[
i
],
DEFAULT_EXTRA_SZ
,
"%s"
,
str
);
st
++
;
st
++
;
...
@@ -481,9 +481,12 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
...
@@ -481,9 +481,12 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
}
}
}
/* for loop on options */
}
/* for loop on options */
printf
(
"[LIBCONFIG] %s: %i/%i parameters successfully set, (%i to default value)
\n
"
,
printf_params
(
cfg
,
((
prefix
==
NULL
)
?
"(root)"
:
prefix
),
"[LIBCONFIG] %s: %i/%i parameters successfully set, (%i to default value)
\n
"
,
status
,
numoptions
,
numdefvals
);
prefix
==
NULL
?
"(root)"
:
prefix
,
status
,
numoptions
,
numdefvals
);
if
(
fatalerror
==
1
)
{
if
(
fatalerror
==
1
)
{
fprintf
(
stderr
,
"[LIBCONFIG] fatal errors found when processing %s
\n
"
,
libconfig_privdata
.
configfile
);
fprintf
(
stderr
,
"[LIBCONFIG] fatal errors found when processing %s
\n
"
,
libconfig_privdata
.
configfile
);
...
@@ -517,8 +520,7 @@ int config_libconfig_getlist(configmodule_interface_t *cfg,
...
@@ -517,8 +520,7 @@ int config_libconfig_getlist(configmodule_interface_t *cfg,
status
=
ParamList
->
numelt
=
config_setting_length
(
setting
);
status
=
ParamList
->
numelt
=
config_setting_length
(
setting
);
printf_params
(
cfg
,
"[LIBCONFIG] %i %s in config file %s
\n
"
,
ParamList
->
numelt
,
listpath
,
libconfig_privdata
.
configfile
);
printf_params
(
cfg
,
"[LIBCONFIG] %i %s in config file %s
\n
"
,
ParamList
->
numelt
,
listpath
,
libconfig_privdata
.
configfile
);
}
else
{
}
else
{
printf
(
"[LIBCONFIG] list %s not found in config file %s
\n
"
,
printf_params
(
cfg
,
"[LIBCONFIG] list %s not found in config file %s
\n
"
,
listpath
,
libconfig_privdata
.
configfile
);
listpath
,
libconfig_privdata
.
configfile
);
ParamList
->
numelt
=
0
;
ParamList
->
numelt
=
0
;
status
=
-
1
;
status
=
-
1
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment