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
332f213d
Commit
332f213d
authored
1 year ago
by
Eric Vidal
Browse files
Options
Downloads
Patches
Plain Diff
remove useless module_path function
parent
659a7cfd
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/module/deps-lib/deps
+0
-1
0 additions, 1 deletion
src/lib66/module/deps-lib/deps
src/lib66/module/module_path.c
+0
-87
0 additions, 87 deletions
src/lib66/module/module_path.c
with
0 additions
and
88 deletions
src/lib66/module/deps-lib/deps
+
0
−
1
View file @
332f213d
get_list.o
module_in_cmdline.o
module_path.o
module_search_service.o
parse_module.o
parse_module_check_dir.o
...
...
This diff is collapsed.
Click to expand it.
src/lib66/module/module_path.c
deleted
100644 → 0
+
0
−
87
View file @
659a7cfd
/*
* module_path.c
*
* Copyright (c) 2018-2021 Eric Vidal <eric@obarun.org>
*
* All rights reserved.
*
* This file is part of Obarun. It is subject to the license terms in
* the LICENSE file found in the top-level directory of this
* distribution.
* This file may not be copied, modified, propagated, or distributed
* except according to the terms contained in the LICENSE file./
*/
#include
<sys/types.h>
#include
<oblibs/log.h>
#include
<oblibs/types.h>
#include
<oblibs/string.h>
#include
<skalibs/stralloc.h>
#include
<66/constants.h>
#include
<66/utils.h>
#include
<66/instance.h>
/* @sdir -> service dir
* @mdir -> module dir */
int
module_path
(
stralloc
*
sdir
,
stralloc
*
mdir
,
char
const
*
sv
,
char
const
*
frontend_src
,
uid_t
owner
)
{
log_flow
()
;
int
r
,
insta
;
stralloc
sainsta
=
STRALLOC_ZERO
;
stralloc
mhome
=
STRALLOC_ZERO
;
// module user dir
stralloc
shome
=
STRALLOC_ZERO
;
// service user dir
char
const
*
src
=
0
;
char
const
*
dest
=
0
;
insta
=
instance_check
(
sv
)
;
instance_splitname
(
&
sainsta
,
sv
,
insta
,
SS_INSTANCE_TEMPLATE
)
;
if
(
!
owner
)
{
src
=
SS_MODULE_ADMDIR
;
dest
=
frontend_src
;
}
else
{
if
(
!
set_ownerhome
(
&
mhome
,
owner
))
log_warnusys_return
(
LOG_EXIT_ZERO
,
"set home directory"
)
;
if
(
!
stralloc_cats
(
&
mhome
,
SS_MODULE_USERDIR
))
log_warnsys_return
(
LOG_EXIT_ZERO
,
"stralloc"
)
;
if
(
!
stralloc_0
(
&
mhome
))
log_warnsys_return
(
LOG_EXIT_ZERO
,
"stralloc"
)
;
mhome
.
len
--
;
src
=
mhome
.
s
;
if
(
!
set_ownerhome
(
&
shome
,
owner
))
log_warnusys_return
(
LOG_EXIT_ZERO
,
"set home directory"
)
;
if
(
!
stralloc_cats
(
&
shome
,
SS_SERVICE_USERDIR
))
log_warnsys_return
(
LOG_EXIT_ZERO
,
"stralloc"
)
;
if
(
!
stralloc_0
(
&
shome
))
log_warnsys_return
(
LOG_EXIT_ZERO
,
"stralloc"
)
;
shome
.
len
--
;
dest
=
shome
.
s
;
}
if
(
!
auto_stra
(
mdir
,
src
,
sainsta
.
s
))
log_warnsys_return
(
LOG_EXIT_ZERO
,
"stralloc"
)
;
r
=
scan_mode
(
mdir
->
s
,
S_IFDIR
)
;
if
(
!
r
||
r
==
-
1
)
{
mdir
->
len
=
0
;
src
=
SS_MODULE_ADMDIR
;
if
(
!
auto_stra
(
mdir
,
src
,
sainsta
.
s
))
log_warnsys_return
(
LOG_EXIT_ZERO
,
"stralloc"
)
;
r
=
scan_mode
(
mdir
->
s
,
S_IFDIR
)
;
if
(
!
r
||
r
==
-
1
)
{
mdir
->
len
=
0
;
src
=
SS_MODULE_SYSDIR
;
if
(
!
auto_stra
(
mdir
,
src
,
sainsta
.
s
))
log_warnsys_return
(
LOG_EXIT_ZERO
,
"stralloc"
)
;
r
=
scan_mode
(
mdir
->
s
,
S_IFDIR
)
;
if
(
!
r
||
r
==
-
1
)
log_warnu_return
(
LOG_EXIT_ZERO
,
"find module: "
,
sv
)
;
}
}
if
(
!
auto_stra
(
sdir
,
dest
,
sv
))
log_warnsys_return
(
LOG_EXIT_ZERO
,
"stralloc"
)
;
stralloc_free
(
&
sainsta
)
;
stralloc_free
(
&
mhome
)
;
stralloc_free
(
&
shome
)
;
return
1
;
}
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