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
5e4d95e1
Commit
5e4d95e1
authored
4 years ago
by
Eric Vidal
Browse files
Options
Downloads
Patches
Plain Diff
implement module
parent
16459b5a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/lib66/ssexec_disable.c
+13
-4
13 additions, 4 deletions
src/lib66/ssexec_disable.c
src/lib66/ssexec_start.c
+10
-1
10 additions, 1 deletion
src/lib66/ssexec_start.c
src/lib66/ssexec_stop.c
+10
-1
10 additions, 1 deletion
src/lib66/ssexec_stop.c
with
33 additions
and
6 deletions
src/lib66/ssexec_disable.c
+
13
−
4
View file @
5e4d95e1
...
...
@@ -19,6 +19,7 @@
#include
<oblibs/obgetopt.h>
#include
<oblibs/log.h>
#include
<oblibs/string.h>
#include
<oblibs/sastr.h>
#include
<skalibs/stralloc.h>
#include
<skalibs/genalloc.h>
...
...
@@ -139,8 +140,7 @@ int ssexec_disable(int argc, char const *const *argv,char const *const *envp,sse
{
int
r
,
logname
;
unsigned
int
nlongrun
,
nclassic
,
stop
;
genalloc
tostop
=
GENALLOC_ZERO
;
//ss_resolve_t
genalloc
gares
=
GENALLOC_ZERO
;
//ss_resolve_t
ss_resolve_t
res
=
RESOLVE_ZERO
;
...
...
@@ -174,9 +174,18 @@ int ssexec_disable(int argc, char const *const *argv,char const *const *envp,sse
char
const
*
name
=
*
argv
;
if
(
!
ss_resolve_check
(
workdir
.
s
,
name
))
log_info_nclean_return
(
LOG_EXIT_ZERO
,
&
cleanup
,
name
,
" is not enabled"
)
;
if
(
!
ss_resolve_read
(
&
res
,
workdir
.
s
,
name
))
log_dieusys_nclean
(
LOG_EXIT_SYS
,
&
cleanup
,
"read resolve file of: "
,
name
)
;
if
(
!
ss_resolve_append
(
&
gares
,
&
res
))
log_dieusys_nclean
(
LOG_EXIT_SYS
,
&
cleanup
,
"append services selection with: "
,
name
)
;
if
(
res
.
type
==
TYPE_MODULE
)
{
if
(
!
module_in_cmdline
(
&
gares
,
&
res
,
workdir
.
s
))
log_dieu_nclean
(
LOG_EXIT_SYS
,
&
cleanup
,
"add dependencies of module: "
,
name
)
;
}
else
{
if
(
!
ss_resolve_append
(
&
gares
,
&
res
))
log_dieusys_nclean
(
LOG_EXIT_SYS
,
&
cleanup
,
"append services selection with: "
,
name
)
;
}
}
for
(
unsigned
int
i
=
0
;
i
<
genalloc_len
(
ss_resolve_t
,
&
gares
)
;
i
++
)
{
pres
=
&
genalloc_s
(
ss_resolve_t
,
&
gares
)[
i
]
;
...
...
This diff is collapsed.
Click to expand it.
src/lib66/ssexec_start.c
+
10
−
1
View file @
5e4d95e1
...
...
@@ -250,7 +250,16 @@ int ssexec_start(int argc, char const *const *argv,char const *const *envp,ssexe
char
const
*
name
=
*
argv
;
if
(
!
ss_resolve_check
(
sares
.
s
,
name
))
log_info_return
(
LOG_EXIT_ZERO
,
name
,
" is not enabled"
)
;
if
(
!
ss_resolve_read
(
&
res
,
sares
.
s
,
name
))
log_dieusys
(
LOG_EXIT_SYS
,
"read resolve file of: "
,
name
)
;
if
(
!
ss_resolve_append
(
&
gares
,
&
res
))
log_dieusys
(
LOG_EXIT_SYS
,
"append services selection with: "
,
name
)
;
if
(
res
.
type
==
TYPE_MODULE
)
{
if
(
!
module_in_cmdline
(
&
gares
,
&
res
,
sares
.
s
))
log_dieu
(
LOG_EXIT_SYS
,
"add dependencies of module: "
,
name
)
;
}
else
{
if
(
!
ss_resolve_append
(
&
gares
,
&
res
))
log_dieusys
(
LOG_EXIT_SYS
,
"append services selection with: "
,
name
)
;
}
}
for
(
unsigned
int
i
=
0
;
i
<
genalloc_len
(
ss_resolve_t
,
&
gares
)
;
i
++
)
...
...
This diff is collapsed.
Click to expand it.
src/lib66/ssexec_stop.c
+
10
−
1
View file @
5e4d95e1
...
...
@@ -159,7 +159,16 @@ int ssexec_stop(int argc, char const *const *argv,char const *const *envp,ssexec
char
const
*
name
=
*
argv
;
if
(
!
ss_resolve_check
(
sares
.
s
,
name
))
log_info_return
(
LOG_EXIT_ZERO
,
name
,
" is not enabled"
)
;
if
(
!
ss_resolve_read
(
&
res
,
sares
.
s
,
name
))
log_dieusys
(
LOG_EXIT_SYS
,
"read resolve file of: "
,
name
)
;
if
(
!
ss_resolve_append
(
&
gares
,
&
res
))
log_dieusys
(
LOG_EXIT_SYS
,
"append resolve file of: "
,
name
)
;
if
(
res
.
type
==
TYPE_MODULE
)
{
if
(
!
module_in_cmdline
(
&
gares
,
&
res
,
sares
.
s
))
log_dieu
(
LOG_EXIT_SYS
,
"add dependencies of module: "
,
name
)
;
}
else
{
if
(
!
ss_resolve_append
(
&
gares
,
&
res
))
log_dieusys
(
LOG_EXIT_SYS
,
"append resolve file of: "
,
name
)
;
}
}
for
(
unsigned
int
i
=
0
;
i
<
genalloc_len
(
ss_resolve_t
,
&
gares
)
;
i
++
)
...
...
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