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
0545d30a
Commit
0545d30a
authored
1 year ago
by
Eric Vidal
Browse files
Options
Downloads
Patches
Plain Diff
typo fix and memories
parent
23d4c3bf
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/write/write_common.c
+2
-4
2 additions, 4 deletions
src/lib66/write/write_common.c
src/lib66/write/write_execute_scripts.c
+1
-1
1 addition, 1 deletion
src/lib66/write/write_execute_scripts.c
src/lib66/write/write_logger.c
+9
-3
9 additions, 3 deletions
src/lib66/write/write_logger.c
with
12 additions
and
8 deletions
src/lib66/write/write_common.c
+
2
−
4
View file @
0545d30a
...
...
@@ -111,10 +111,10 @@ int write_common(resolve_service_t *res, char const *dst)
int
fd
;
size_t
wlen
=
strlen
(
what
)
;
char
tmp
[
SS_MAX_PATH_LEN
+
1
]
;
char
dest
[
dstlen
+
1
+
wlen
+
1
];
char
dest
[
dstlen
+
1
+
wlen
+
1
]
;
char
basename
[
SS_MAX_PATH_LEN
+
1
]
;
if
(
what
[
0
]
==
'/'
)
{
if
(
what
[
0
]
==
'/'
)
{
auto_strings
(
tmp
,
what
)
;
...
...
@@ -184,7 +184,5 @@ int write_common(resolve_service_t *res, char const *dst)
stralloc_free
(
&
sa
)
;
}
return
1
;
}
This diff is collapsed.
Click to expand it.
src/lib66/write/write_execute_scripts.c
+
1
−
1
View file @
0545d30a
...
...
@@ -39,7 +39,7 @@ int write_execute_scripts(char const *file, char const *contents, char const *ds
char
run
[
strlen
(
contents
)
+
1
]
;
auto_strings
(
run
,
contents
)
;
log_trace
(
"
crea
te file: "
,
dst
,
"/"
,
file
)
;
log_trace
(
"
wri
te file: "
,
dst
,
"/"
,
file
)
;
if
(
!
file_write_unsafe
(
dst
,
file
,
run
,
FAKELEN
))
log_warnusys_return
(
LOG_EXIT_ZERO
,
"write: "
,
dst
,
"/"
,
file
)
;
...
...
This diff is collapsed.
Click to expand it.
src/lib66/write/write_logger.c
+
9
−
3
View file @
0545d30a
...
...
@@ -77,7 +77,13 @@ void write_logger(resolve_service_t *res, char const *destination, uint8_t force
parse_cleanup
(
res
,
destination
,
force
)
;
log_dieusys
(
LOG_EXIT_SYS
,
"create directory: "
,
res
->
sa
.
s
+
res
->
logger
.
destination
)
;
}
/**
* ISSUE: In case of e.g. earlier service the log
* may point to a tmpfs directory. At next reboot
* the log directory will not be present. We just
* react as oneshot service making it at .run file
* with execl-toc.
*/
if
(
!
owner
&&
((
res
->
execute
.
run
.
build
==
BUILD_AUTO
)
||
(
!
res
->
execute
.
run
.
build
)))
{
if
(
!
youruid
(
&
log_uid
,
logrunner
)
||
!
yourgid
(
&
log_gid
,
log_uid
))
{
...
...
@@ -93,7 +99,7 @@ void write_logger(resolve_service_t *res, char const *destination, uint8_t force
char
write
[
strlen
(
destination
)
+
10
]
;
/** run script */
log_trace
(
"
crea
te file: "
,
destination
,
"/run"
)
;
log_trace
(
"
wri
te file: "
,
destination
,
"/run"
)
;
if
(
!
file_write_unsafe
(
destination
,
"run"
,
res
->
sa
.
s
+
res
->
execute
.
run
.
run
,
strlen
(
res
->
sa
.
s
+
res
->
execute
.
run
.
run
)))
{
parse_cleanup
(
res
,
destination
,
force
)
;
log_dieusys
(
LOG_EXIT_SYS
,
"write: "
,
destination
,
"/run.user"
)
;
...
...
@@ -107,7 +113,7 @@ void write_logger(resolve_service_t *res, char const *destination, uint8_t force
}
/** run.user script */
log_trace
(
"
crea
te file: "
,
destination
,
"/run.user"
)
;
log_trace
(
"
wri
te file: "
,
destination
,
"/run.user"
)
;
if
(
!
file_write_unsafe
(
destination
,
"run.user"
,
res
->
sa
.
s
+
res
->
execute
.
run
.
run_user
,
strlen
(
res
->
sa
.
s
+
res
->
execute
.
run
.
run_user
)))
{
parse_cleanup
(
res
,
destination
,
force
)
;
log_dieusys
(
LOG_EXIT_SYS
,
"write: "
,
destination
,
"/run.user"
)
;
...
...
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