diff options
Diffstat (limited to 'src/logic/tpax_file_create_memory_snapshot.c')
-rw-r--r-- | src/logic/tpax_file_create_memory_snapshot.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/logic/tpax_file_create_memory_snapshot.c b/src/logic/tpax_file_create_memory_snapshot.c index 7db21ea..bbcd1df 100644 --- a/src/logic/tpax_file_create_memory_snapshot.c +++ b/src/logic/tpax_file_create_memory_snapshot.c @@ -25,6 +25,7 @@ int tpax_file_create_memory_snapshot( const struct tpax_driver_ctx * dctx, + int fdat, const char * path, const struct stat * srcst, void * addr) @@ -44,11 +45,7 @@ int tpax_file_create_memory_snapshot( return TPAX_CUSTOM_ERROR(dctx,TPAX_ERR_REGION_SIZE); /* open */ - fd = openat( - tpax_driver_fdcwd(dctx),path, - O_CLOEXEC|O_NOCTTY|O_NOFOLLOW); - - if (fd < 0) + if ((fd = openat(fdat,path,O_CLOEXEC|O_NOCTTY|O_NOFOLLOW,0)) < 0) return TPAX_SYSTEM_ERROR(dctx); /* stat compare */ |