summaryrefslogtreecommitdiff
path: root/src/driver/tpax_amain.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/driver/tpax_amain.c')
-rw-r--r--src/driver/tpax_amain.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/driver/tpax_amain.c b/src/driver/tpax_amain.c
index d94eaf0..9d87e18 100644
--- a/src/driver/tpax_amain.c
+++ b/src/driver/tpax_amain.c
@@ -4,6 +4,7 @@
/* Released under GPLv2 and GPLv3; see COPYING.TPAX. */
/******************************************************/
+#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include <tpax/tpax.h>
@@ -67,6 +68,7 @@ int tpax_main(char ** argv, char ** envp, const struct tpax_fd_ctx * fdctx)
{
int ret;
int fdout;
+ int fdcwd;
uint64_t flags;
struct tpax_driver_ctx * dctx;
struct tpax_unit_ctx * uctx;
@@ -74,6 +76,7 @@ int tpax_main(char ** argv, char ** envp, const struct tpax_fd_ctx * fdctx)
flags = TPAX_DRIVER_FLAGS;
fdout = fdctx ? fdctx->fdout : STDOUT_FILENO;
+ fdcwd = fdctx ? fdctx->fdcwd : AT_FDCWD;
if ((ret = tpax_get_driver_ctx(argv,envp,flags,fdctx,&dctx)))
return (ret == TPAX_USAGE)
@@ -85,7 +88,7 @@ int tpax_main(char ** argv, char ** envp, const struct tpax_fd_ctx * fdctx)
return tpax_exit(dctx,TPAX_ERROR);
for (unit=dctx->units; *unit; unit++) {
- if (!(tpax_get_unit_ctx(dctx,*unit,&uctx))) {
+ if (!(tpax_get_unit_ctx(dctx,fdcwd,*unit,&uctx))) {
tpax_perform_unit_actions(dctx,uctx);
tpax_free_unit_ctx(uctx);
}