Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
System Manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
system
System Manager
Commits
c6bac710
Verified
Commit
c6bac710
authored
3 weeks ago
by
Amin Ben Romdhane
Committed by
IOPSYS Dev
3 weeks ago
Browse files
Options
Downloads
Patches
Plain Diff
Add support for displaying the schema data model with '-d' option
parent
65e37b4b
Branches
Branches containing commit
No related tags found
1 merge request
!33
Add support for displaying the schema data model with '-d' option
Pipeline
#206148
passed
3 weeks ago
Stage: static_code_analysis
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sysmngr.c
+12
-3
12 additions, 3 deletions
src/sysmngr.c
with
12 additions
and
3 deletions
src/sysmngr.c
+
12
−
3
View file @
c6bac710
...
...
@@ -42,7 +42,8 @@ static void usage(char *prog)
fprintf
(
stderr
,
"
\n
"
);
fprintf
(
stderr
,
"options:
\n
"
);
fprintf
(
stderr
,
" -l <0-7> Set the loglevel
\n
"
);
fprintf
(
stderr
,
" -h Displays this help
\n
"
);
fprintf
(
stderr
,
" -d Display the schema data model supported by micro-service
\n
"
);
fprintf
(
stderr
,
" -h Display this help
\n
"
);
fprintf
(
stderr
,
"
\n
"
);
}
...
...
@@ -73,9 +74,9 @@ int main(int argc, char **argv)
.
cb
=
config_reload_cb
,
};
int
log_level
=
DEFAULT_LOG_LEVEL
;
int
c
=
0
;
int
c
=
0
,
dm_type
=
0
;
while
((
c
=
getopt
(
argc
,
argv
,
"hl:"
))
!=
-
1
)
{
while
((
c
=
getopt
(
argc
,
argv
,
"h
d
l:"
))
!=
-
1
)
{
switch
(
c
)
{
case
'l'
:
log_level
=
(
int
)
strtod
(
optarg
,
NULL
);
...
...
@@ -83,6 +84,9 @@ int main(int argc, char **argv)
log_level
=
DEFAULT_LOG_LEVEL
;
}
break
;
case
'd'
:
dm_type
++
;
break
;
case
'h'
:
usage
(
argv
[
0
]);
return
EXIT_SUCCESS
;
...
...
@@ -98,6 +102,11 @@ int main(int argc, char **argv)
bbfdm_ubus_set_log_level
(
log_level
);
bbfdm_ubus_load_data_model
(
tDynamicObj
);
if
(
dm_type
>
0
)
{
int
res
=
bbfdm_print_data_model_schema
(
&
bbfdm_ctx
,
dm_type
);
exit
(
res
);
}
openlog
(
"sysmngr"
,
LOG_CONS
|
LOG_PID
|
LOG_NDELAY
,
LOG_LOCAL1
);
#ifdef SYSMNGR_REBOOTS
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment