Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
6
66
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
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eric Vidal
66
Commits
76688fd2
Commit
76688fd2
authored
2 years ago
by
Eric Vidal
Browse files
Options
Downloads
Patches
Plain Diff
pass through service Master resolve file instead of listing the service directory
parent
5c53a603
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/lib66/graph/graph_build_service_bytree.c
+26
-12
26 additions, 12 deletions
src/lib66/graph/graph_build_service_bytree.c
with
26 additions
and
12 deletions
src/lib66/graph/graph_build_service_bytree.c
+
26
−
12
View file @
76688fd2
...
...
@@ -28,7 +28,7 @@
#include
<66/enum.h>
#include
<66/graph.h>
/** @tree: absolute path of the tree
/** @tree: absolute path of the tree
including SS_SVDIRS
* what = 0 -> classic
* what = 1 -> atomic and bundle
* what > 1 -> module */
...
...
@@ -36,31 +36,44 @@ int graph_build_service_bytree(graph_t *g, char const *tree, uint8_t what)
{
log_flow
()
;
int
e
=
0
;
int
e
=
0
,
pos
=
0
;
stralloc
sa
=
STRALLOC_ZERO
;
resolve_service_t
res
=
RESOLVE_SERVICE_ZERO
;
resolve_wrapper_t_ref
wres
=
resolve_set_struct
(
DATA_SERVICE
,
&
res
)
;
size_t
treelen
=
strlen
(
tree
),
pos
=
0
;
char
solve
[
treelen
+
SS_SVDIRS_LEN
+
SS_RESOLVE_LEN
+
1
]
;
resolve_service_master_t
mres
=
RESOLVE_SERVICE_MASTER_ZERO
;
resolve_wrapper_t_ref
mwres
=
resolve_set_struct
(
DATA_SERVICE_MASTER
,
&
mres
)
;
auto_strings
(
solve
,
tree
,
SS_SVDIRS
,
SS_RESOLVE
)
;
if
(
!
resolve_read_g
(
mwres
,
tree
,
SS_MASTER
+
1
))
{
log_warnu
(
"read resolve Master file of trees"
)
;
goto
err
;
}
char
const
*
exclude
[
2
]
=
{
SS_MASTER
+
1
,
0
}
;
if
(
mres
.
nclassic
)
if
(
!
auto_stra
(
&
sa
,
mres
.
sa
.
s
+
mres
.
classic
))
goto
err
;
if
(
!
sastr_dir_get
(
&
sa
,
solve
,
exclude
,
S_IFREG
))
goto
err
;
if
(
mres
.
nmodule
)
if
(
!
auto_stra
(
&
sa
,
mres
.
sa
.
s
+
mres
.
module
))
goto
err
;
solve
[
treelen
+
SS_SVDIRS_LEN
]
=
0
;
if
(
mres
.
nbundle
)
if
(
!
auto_stra
(
&
sa
,
mres
.
sa
.
s
+
mres
.
bundle
))
goto
err
;
if
(
!
service_resolve_sort_bytype
(
&
sa
,
solve
))
goto
err
;
if
(
mres
.
nlongrun
)
if
(
!
auto_stra
(
&
sa
,
mres
.
sa
.
s
+
mres
.
longrun
))
goto
err
;
if
(
mres
.
noneshot
)
if
(
!
auto_stra
(
&
sa
,
mres
.
sa
.
s
+
mres
.
oneshot
))
goto
err
;
FOREACH_SASTR
(
&
sa
,
pos
)
{
char
*
service
=
sa
.
s
+
pos
;
if
(
!
resolve_read
(
wres
,
solv
e
,
service
))
if
(
!
resolve_read
(
wres
,
tre
e
,
service
))
goto
err
;
char
*
str
=
res
.
sa
.
s
;
...
...
@@ -118,6 +131,7 @@ int graph_build_service_bytree(graph_t *g, char const *tree, uint8_t what)
err:
resolve_free
(
wres
)
;
resolve_free
(
mwres
)
;
stralloc_free
(
&
sa
)
;
return
e
;
}
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