summaryrefslogtreecommitdiff
path: root/src/init
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-04-28 11:59:05 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-04-28 11:59:05 +0000
commit13aa9bd172ec10cd8d3ddae6c7159dbe9bf91535 (patch)
tree1b0b8771a123f6499f38e348594e4a9864a2391c /src/init
parent4813ad91d86f6235607cc9f981e00964704c1764 (diff)
downloads6-linux-init-13aa9bd172ec10cd8d3ddae6c7159dbe9bf91535.tar.xz
s6-linux-init: better internal API for envmodifs passing
Diffstat (limited to 'src/init')
-rw-r--r--src/init/s6-linux-init.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/init/s6-linux-init.c b/src/init/s6-linux-init.c
index 94a2054..5223d54 100644
--- a/src/init/s6-linux-init.c
+++ b/src/init/s6-linux-init.c
@@ -37,7 +37,7 @@ static inline char const *scan_cmdline (char const *initdefault, char const *con
return initdefault ;
}
-static inline void run_stage2 (char const *basedir, char const **argv, unsigned int argc, char const *const *envp, size_t envlen, stralloc *envmodifs, char const *initdefault)
+static inline void run_stage2 (char const *basedir, char const **argv, unsigned int argc, char const *const *envp, size_t envlen, char const *modifs, size_t modiflen, char const *initdefault)
{
size_t dirlen = strlen(basedir) ;
char const *childargv[argc + 3] ;
@@ -58,7 +58,7 @@ static inline void run_stage2 (char const *basedir, char const **argv, unsigned
strerr_diefu1sys(111, "open " LOGFIFO " for writing") ;
if (fd_copy(2, 1) == -1)
strerr_diefu1sys(111, "fd_copy stdout to stderr") ;
- xpathexec_r(childargv, envp, envlen, envmodifs->s, envmodifs->len) ;
+ xpathexec_r(childargv, envp, envlen, modifs, modiflen) ;
}
int main (int argc, char const **argv, char const *const *envp)
@@ -167,7 +167,7 @@ int main (int argc, char const **argv, char const *const *envp)
}
pid = fork() ;
if (pid == -1) strerr_diefu1sys(111, "fork") ;
- if (!pid) run_stage2(basedir, argv, argc, newenvp, !!path, &envmodifs, initdefault) ;
+ if (!pid) run_stage2(basedir, argv, argc, newenvp, !!path, envmodifs.s, envmodifs.len, initdefault) ;
if (fd_copy(2, 1) == -1)
strerr_diefu1sys(111, "redirect output file descriptor") ;
xpathexec_r(newargv, newenvp, !!path, envmodifs.s, envmodifs.len) ;