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
1faf519b
Commit
1faf519b
authored
6 years ago
by
Eric Vidal
Browse files
Options
Downloads
Patches
Plain Diff
minor fix
parent
60259a67
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-all.c
+7
-11
7 additions, 11 deletions
src/66/66-all.c
with
7 additions
and
11 deletions
src/66/66-all.c
+
7
−
11
View file @
1faf519b
...
...
@@ -66,7 +66,7 @@ int doit(char const *tree,char const *treename,char const *live, unsigned int wh
genalloc
ga
=
GENALLOC_ZERO
;
//stralist
char
ownerstr
[
256
]
;
char
ownerstr
[
UID_FMT
]
;
size_t
ownerlen
=
uid_fmt
(
ownerstr
,
owner
)
;
ownerstr
[
ownerlen
]
=
0
;
...
...
@@ -84,7 +84,7 @@ int doit(char const *tree,char const *treename,char const *live, unsigned int wh
if
(
!
dir_get
(
&
ga
,
src
,
""
,
S_IFREG
))
{
VERBO3
strerr_warnwu2x
(
"
find source of classic
service
for
tree: "
,
treename
)
;
VERBO3
strerr_warnwu2x
(
"
get
service
s of
tree: "
,
src
)
;
goto
err
;
}
...
...
@@ -152,14 +152,10 @@ static void redir_fd(void)
int
main
(
int
argc
,
char
const
*
const
*
argv
,
char
const
*
const
*
envp
)
{
int
r
;
int
what
;
int
wstat
;
int
shut
=
0
;
int
r
,
what
,
wstat
,
shut
=
0
,
fd
;
pid_t
pid
;
uid_t
owner
;
int
fd
;
char
const
*
treename
=
NULL
;
stralloc
base
=
STRALLOC_ZERO
;
...
...
@@ -217,7 +213,7 @@ int main(int argc, char const *const *argv,char const *const *envp)
if
(
!
r
)
retstralloc
(
111
,
"main"
)
;
if
(
r
<
0
)
strerr_dief3x
(
111
,
"scandir: "
,
scandir
.
s
,
" must be an absolute path"
)
;
if
((
scandir_ok
(
scandir
.
s
))
!=
1
)
strerr_dief3sys
(
111
,
"scandir: "
,
scandir
.
s
,
" is not running"
)
;
if
((
scandir_ok
(
scandir
.
s
))
<=
0
)
strerr_dief3sys
(
111
,
"scandir: "
,
scandir
.
s
,
" is not running"
)
;
if
(
!
stralloc_copy
(
&
livetree
,
&
live
))
retstralloc
(
111
,
"main"
)
;
...
...
@@ -301,7 +297,7 @@ int main(int argc, char const *const *argv,char const *const *envp)
if
(
!
tree_get_permissions
(
tree
.
s
,
owner
))
strerr_dief2x
(
110
,
"You're not allowed to use the tree: "
,
tree
.
s
)
;
if
(
what
)
{
char
const
*
newargv
[
9
]
;
...
...
@@ -332,7 +328,7 @@ int main(int argc, char const *const *argv,char const *const *envp)
}
if
(
!
doit
(
tree
.
s
,
treename
,
live
.
s
,
what
,
owner
,
envp
))
strerr_diefu3x
(
111
,(
what
)
?
"start"
:
"stop"
,
" service
for
tree: "
,
treename
)
;
if
(
!
doit
(
tree
.
s
,
treename
,
live
.
s
,
what
,
owner
,
envp
))
strerr_diefu3x
(
111
,(
what
)
?
"start"
:
"stop"
,
" service
s of
tree: "
,
treename
)
;
}
end:
if
(
shut
)
...
...
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