diff options
author | midipix <writeonce@midipix.org> | 2021-04-21 04:04:56 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2021-04-21 04:06:18 +0000 |
commit | 67ad73303a7af09447eaa4c8066efff7a0146422 (patch) | |
tree | 7f6fc4d4316b0090bcfef7ac460d7ad2404ad972 | |
parent | d816c0834d5388df39bd32cf0c0f6668c99cd049 (diff) | |
download | tpax-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.c | 7 |
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) { |