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
db1fdc32
Commit
db1fdc32
authored
1 year ago
by
Eric Vidal
Browse files
Options
Downloads
Patches
Plain Diff
remove frontend file of module ASAP, also fix treename for the parse process
parent
4c53ff81
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/lib66/exec/ssexec_parse.c
+1
-0
1 addition, 0 deletions
src/lib66/exec/ssexec_parse.c
src/lib66/module/parse_module.c
+14
-13
14 additions, 13 deletions
src/lib66/module/parse_module.c
with
15 additions
and
13 deletions
src/lib66/exec/ssexec_parse.c
+
1
−
0
View file @
db1fdc32
...
...
@@ -99,6 +99,7 @@ int ssexec_parse(int argc, char const *const *argv, ssexec_t *info)
sv
=
bname
;
directory_forced
=
dname
;
}
else
sv
=
*
argv
;
...
...
This diff is collapsed.
Click to expand it.
src/lib66/module/parse_module.c
+
14
−
13
View file @
db1fdc32
...
...
@@ -358,14 +358,15 @@ void parse_module(resolve_service_t *res, resolve_service_t *ares, unsigned int
size_t
pos
=
0
,
copylen
=
0
,
len
=
0
;
uint8_t
opt_tree
=
info
->
opt_tree
;
char
name
[
strlen
(
res
->
sa
.
s
+
res
->
name
)
+
1
]
;
char
*
src
=
res
->
sa
.
s
+
res
->
path
.
frontend
;
char
dirname
[
strlen
(
src
)]
;
char
src
[
strlen
(
res
->
sa
.
s
+
res
->
path
.
frontend
)
+
1
]
;
char
dirname
[
strlen
(
src
)
+
1
]
;
char
copy
[
SS_MAX_PATH_LEN
+
1
]
;
char
ainsta
[
strlen
(
res
->
sa
.
s
+
res
->
name
)
+
1
]
;
stralloc
list
=
STRALLOC_ZERO
;
resolve_wrapper_t_ref
wres
=
0
;
auto_strings
(
name
,
res
->
sa
.
s
+
res
->
name
)
;
auto_strings
(
src
,
res
->
sa
.
s
+
res
->
path
.
frontend
)
;
log_trace
(
"parse module: "
,
name
)
;
...
...
@@ -421,6 +422,14 @@ void parse_module(resolve_service_t *res, resolve_service_t *ares, unsigned int
if
(
!
hiercopy
(
dirname
,
copy
))
log_dieusys
(
LOG_EXIT_SYS
,
"copy: "
,
dirname
,
" to: "
,
copy
)
;
auto_strings
(
copy
+
copylen
,
"/"
,
ainsta
)
;
/** remove the original service frontend file inside the copied directory
* to avoid double frontend service file for a same service.*/
errno
=
0
;
if
(
unlink
(
copy
)
<
0
&&
errno
!=
ENOENT
)
log_dieusys
(
LOG_EXIT_ZERO
,
"unlink: "
,
copy
)
;
copy
[
copylen
]
=
0
;
parse_module_regex
(
res
,
copy
,
copylen
,
info
)
;
...
...
@@ -429,14 +438,6 @@ void parse_module(resolve_service_t *res, resolve_service_t *ares, unsigned int
log_warn
(
"skip configuration of the module: "
,
name
,
" -- already configured"
)
;
}
auto_strings
(
copy
+
copylen
,
"/"
,
ainsta
)
;
/** remove the original service frontend file inside the copied directory
* to avoid double frontend service file for a same service.*/
errno
=
0
;
if
(
unlink
(
copy
)
<
0
&&
errno
!=
ENOENT
)
log_dieusys
(
LOG_EXIT_ZERO
,
"unlink: "
,
copy
)
;
/** handle new activated depends/requiredby service.*/
{
char
const
*
exclude
[
1
]
=
{
0
}
;
...
...
@@ -463,7 +464,6 @@ void parse_module(resolve_service_t *res, resolve_service_t *ares, unsigned int
{
/* parse each activated services */
len
=
list
.
len
;
uint8_t
out
=
0
;
char
l
[
len
+
1
]
;
...
...
@@ -486,7 +486,6 @@ void parse_module(resolve_service_t *res, resolve_service_t *ares, unsigned int
for
(
pos
=
0
;
pos
<
len
;
pos
+=
strlen
(
l
+
pos
)
+
1
)
{
sa
.
len
=
0
;
info
->
opt_tree
=
opt_tree
;
char
fname
[
strlen
(
l
+
pos
)]
;
char
const
*
exclude
[
1
]
=
{
0
}
;
...
...
@@ -522,10 +521,12 @@ void parse_module(resolve_service_t *res, resolve_service_t *ares, unsigned int
info
->
opt_tree
=
1
;
info
->
treename
.
len
=
0
;
if
(
!
auto_stra
(
&
info
->
treename
,
res
->
sa
.
s
+
res
->
in
tree
))
if
(
!
auto_stra
(
&
info
->
treename
,
res
->
sa
.
s
+
res
->
tree
name
))
log_die_nomem
(
"stralloc"
)
;
parse_frontend
(
sa
.
s
,
ares
,
areslen
,
info
,
force
,
conf
,
!
out
?
copy
:
0
,
fname
,
!
out
?
name
:
0
)
;
info
->
opt_tree
=
opt_tree
;
}
stralloc_free
(
&
sa
)
;
...
...
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