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
eba57485
Commit
eba57485
authored
2 years ago
by
Eric Vidal
Browse files
Options
Downloads
Patches
Plain Diff
prevent user error
parent
c65dfea2
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/lib66/exec/ssexec_parse.c
+6
-28
6 additions, 28 deletions
src/lib66/exec/ssexec_parse.c
with
6 additions
and
28 deletions
src/lib66/exec/ssexec_parse.c
+
6
−
28
View file @
eba57485
...
...
@@ -26,33 +26,7 @@
#include
<66/parser.h>
#include
<66/ssexec.h>
#include
<66/utils.h>
/*
static void check_dir(char const *dir, uint8_t force, int main)
{
log_flow() ;
int r ;
r = scan_mode(dir, S_IFDIR) ;
if (r < 0) {
errno = ENOTDIR ;
log_diesys(LOG_EXIT_SYS,"conflicting format of: ",dir) ;
}
if (r && force && main) {
if ((dir_rm_rf(dir) < 0) || !r )
log_dieusys(LOG_EXIT_SYS,"sanitize directory: ",dir) ;
r = 0 ;
} else if (r && !force && main)
log_die(LOG_EXIT_SYS,"destination: ",dir," already exist") ;
if (!r)
if (!dir_create_parent(dir, 0755))
log_dieusys(LOG_EXIT_SYS,"create: ",dir) ;
}
*/
int
ssexec_parse
(
int
argc
,
char
const
*
const
*
argv
,
ssexec_t
*
info
)
{
log_flow
()
;
...
...
@@ -65,7 +39,7 @@ int ssexec_parse(int argc, char const *const *argv, ssexec_t *info)
for
(;;)
{
int
opt
=
subgetopt_r
(
argc
,
argv
,
OPTS_PARSE
,
&
l
)
;
int
opt
=
subgetopt_r
(
argc
,
argv
,
OPTS_PARSE
,
&
l
)
;
if
(
opt
==
-
1
)
break
;
switch
(
opt
)
...
...
@@ -73,12 +47,16 @@ int ssexec_parse(int argc, char const *const *argv, ssexec_t *info)
case
'f'
:
/** only rewrite the service itself */
if
(
force
)
log_usage
(
usage_enable
)
;
force
=
1
;
break
;
case
'F'
:
/** force to rewrite it dependencies */
/** force to rewrite it dependencies */
if
(
force
)
log_usage
(
usage_enable
)
;
force
=
2
;
break
;
...
...
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