summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-04-21 04:04:56 +0000
committermidipix <writeonce@midipix.org>2021-04-21 04:06:18 +0000
commit67ad73303a7af09447eaa4c8066efff7a0146422 (patch)
tree7f6fc4d4316b0090bcfef7ac460d7ad2404ad972
parentd816c0834d5388df39bd32cf0c0f6668c99cd049 (diff)
downloadtpax-67ad73303a7af09447eaa4c8066efff7a0146422.tar.bz2
tpax-67ad73303a7af09447eaa4c8066efff7a0146422.tar.xz
tpax_file_create_tmpfs_snapshot(): always use the mapped memory buffer.
-rw-r--r--src/logic/tpax_file_create_tmpfs_snapshot.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/logic/tpax_file_create_tmpfs_snapshot.c b/src/logic/tpax_file_create_tmpfs_snapshot.c
index bdfa396..9a731c0 100644
--- a/src/logic/tpax_file_create_tmpfs_snapshot.c
+++ b/src/logic/tpax_file_create_tmpfs_snapshot.c
@@ -39,7 +39,6 @@ int tpax_file_create_tmpfs_snapshot(
void * buf;
size_t buflen;
struct stat dstst;
- char sbuf[2048];
/* record errors */
tpax_driver_set_ectx(
@@ -50,10 +49,8 @@ int tpax_file_create_tmpfs_snapshot(
return TPAX_SYSTEM_ERROR(dctx);
/* buffer */
- if (!(buf = tpax_get_driver_anon_map_addr(dctx,&buflen))) {
- buf = sbuf;
- buflen = sizeof(sbuf);
- }
+ buf = tpax_get_driver_anon_map_addr(
+ dctx,&buflen);
/* open */
if ((fdsrc = openat(fdat,path,O_CLOEXEC|O_NOCTTY|O_NOFOLLOW,0)) < 0) {