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
10235ee0
Commit
10235ee0
authored
3 years ago
by
Eric Vidal
Browse files
Options
Downloads
Patches
Plain Diff
adapt to new sastr_dir_get function interface
parent
cf7dab01
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/66/66-intree.c
+7
-3
7 additions, 3 deletions
src/66/66-intree.c
with
7 additions
and
3 deletions
src/66/66-intree.c
+
7
−
3
View file @
10235ee0
...
...
@@ -226,13 +226,14 @@ static void info_get_graph_src(ss_resolve_graph_t *graph,char const *src,unsigne
stralloc
sa
=
STRALLOC_ZERO
;
genalloc
gares
=
GENALLOC_ZERO
;
char
const
*
exclude
[
2
]
=
{
SS_MASTER
+
1
,
0
}
;
char
solve
[
srclen
+
SS_RESOLVE_LEN
+
1
]
;
memcpy
(
solve
,
src
,
srclen
)
;
memcpy
(
solve
+
srclen
,
SS_RESOLVE
,
SS_RESOLVE_LEN
)
;
solve
[
srclen
+
SS_RESOLVE_LEN
]
=
0
;
if
(
!
sastr_dir_get
(
&
sa
,
solve
,
SS_MASTER
+
1
,
S_IFREG
))
if
(
!
sastr_dir_get
(
&
sa
,
solve
,
exclude
,
S_IFREG
))
log_dieusys
(
LOG_EXIT_SYS
,
"get source service file at: "
,
solve
)
;
if
(
!
ss_resolve_sort_bytype
(
&
gares
,
&
sa
,
src
))
...
...
@@ -252,12 +253,14 @@ static void info_display_allow(char const *field, char const *treename)
size_t
treenamelen
=
strlen
(
treename
)
,
pos
;
stralloc
sa
=
STRALLOC_ZERO
;
stralloc
salist
=
STRALLOC_ZERO
;
char
const
*
exclude
[
1
]
=
{
0
}
;
char
tmp
[
src
.
len
+
treenamelen
+
SS_RULES_LEN
+
1
]
;
// force to close the string
auto_strings
(
tmp
,
src
.
s
)
;
auto_string_from
(
tmp
,
src
.
len
,
treename
,
SS_RULES
)
;
if
(
!
sastr_dir_get
(
&
sa
,
tmp
,
""
,
S_IFREG
))
if
(
!
sastr_dir_get
(
&
sa
,
tmp
,
exclude
,
S_IFREG
))
log_dieusys
(
LOG_EXIT_SYS
,
"get permissions of tree at: "
,
tmp
)
;
for
(
pos
=
0
;
pos
<
sa
.
len
;
pos
+=
strlen
(
sa
.
s
+
pos
)
+
1
)
...
...
@@ -556,8 +559,9 @@ int main(int argc, char const *const *argv, char const *const *envp)
}
else
{
char
const
*
exclude
[
3
]
=
{
SS_BACKUP
+
1
,
SS_RESOLVE
+
1
,
0
}
;
if
(
!
stralloc_0
(
&
src
))
log_die_nomem
(
"stralloc"
)
;
if
(
!
sastr_dir_get
(
&
satree
,
src
.
s
,
SS_BACKUP
+
1
,
S_IFDIR
))
log_dieusys
(
LOG_EXIT_SYS
,
"get list of tree at: "
,
src
.
s
)
;
if
(
!
sastr_dir_get
(
&
satree
,
src
.
s
,
exclude
,
S_IFDIR
))
log_dieusys
(
LOG_EXIT_SYS
,
"get list of tree at: "
,
src
.
s
)
;
if
(
satree
.
len
)
{
...
...
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