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
9665ae5d
Commit
9665ae5d
authored
6 years ago
by
Eric Vidal
Browse files
Options
Downloads
Patches
Plain Diff
sometime i'm really stupid
parent
2f746434
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
+16
-15
16 additions, 15 deletions
src/66/66-all.c
with
16 additions
and
15 deletions
src/66/66-all.c
+
16
−
15
View file @
9665ae5d
...
...
@@ -59,7 +59,6 @@ static inline void info_help (void)
strerr_diefu1sys
(
111
,
"write to stdout"
)
;
}
int
doit
(
char
const
*
tree
,
char
const
*
treename
,
char
const
*
live
,
unsigned
int
what
,
uid_t
owner
,
char
const
*
const
*
envp
)
{
int
wstat
;
...
...
@@ -67,25 +66,27 @@ int doit(char const *tree,char const *treename,char const *live, unsigned int wh
genalloc
ga
=
GENALLOC_ZERO
;
//stralist
size_t
treelen
=
strlen
(
tree
)
;
char
src
[
treelen
+
SS_SVDIRS_LEN
+
SS_SVC_LEN
+
1
]
;
memcpy
(
src
,
tree
,
treelen
)
;
memcpy
(
src
+
treelen
,
SS_SVDIRS
,
SS_SVDIRS_LEN
)
;
memcpy
(
src
+
treelen
+
SS_SVDIRS_LEN
,
SS_SVC
,
SS_SVC_LEN
)
;
src
[
treelen
+
SS_SVDIRS_LEN
+
SS_SVC_LEN
]
=
0
;
char
ownerstr
[
256
]
;
size_t
ownerlen
=
uid_fmt
(
ownerstr
,
owner
)
;
ownerstr
[
ownerlen
]
=
0
;
size_t
livelen
=
strlen
(
live
)
-
1
;
size_t
treenamelen
=
strlen
(
treename
)
;
char
src
[
livelen
+
SS_STATE_LEN
+
1
+
ownerlen
+
1
+
treenamelen
+
SS_RESOLVE_LEN
+
1
]
;
memcpy
(
src
,
live
,
livelen
)
;
memcpy
(
src
+
livelen
,
SS_STATE
,
SS_STATE_LEN
)
;
src
[
livelen
+
SS_STATE_LEN
]
=
'/'
;
memcpy
(
src
+
livelen
+
SS_STATE_LEN
+
1
,
ownerstr
,
ownerlen
)
;
src
[
livelen
+
SS_STATE_LEN
+
1
+
ownerlen
]
=
'/'
;
memcpy
(
src
+
livelen
+
SS_STATE_LEN
+
1
+
ownerlen
+
1
,
treename
,
treenamelen
)
;
memcpy
(
src
+
livelen
+
SS_STATE_LEN
+
1
+
ownerlen
+
1
+
treenamelen
,
SS_RESOLVE
,
SS_RESOLVE_LEN
)
;
src
[
livelen
+
SS_STATE_LEN
+
1
+
ownerlen
+
1
+
treenamelen
+
SS_RESOLVE_LEN
]
=
0
;
if
(
!
dir_get
(
&
ga
,
src
,
""
,
S_IFREG
))
{
VERBO3
strerr_warnwu2x
(
"find source of classic service for tree: "
,
treename
)
;
goto
err
;
}
/** add transparent Master to start the db*/
if
(
!
stra_add
(
&
ga
,
SS_MASTER
+
1
))
{
VERBO3
strerr_warnwu2x
(
"add inner bundle as service to "
,
what
?
"start"
:
"stop"
)
;
goto
err
;
}
{
char
const
*
newargv
[
10
+
genalloc_len
(
stralist
,
&
ga
)]
;
...
...
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