/* * pmemblk_checkW -- block memory pool consistency check */ int pmemblk_checkW(const wchar_t *path, size_t bsize) { char *upath = util_toUTF8(path); if (upath == NULL) return -1; int ret = pmemblk_checkU(upath, bsize); util_free_UTF8(upath); return ret; }
/* * pmemblk_openW -- open a block memory pool */ PMEMblkpool * pmemblk_openW(const wchar_t *path, size_t bsize) { char *upath = util_toUTF8(path); if (upath == NULL) return NULL; PMEMblkpool *ret = pmemblk_openU(upath, bsize); util_free_UTF8(upath); return ret; }
/* * pmemblk_createW -- create a block memory pool */ PMEMblkpool * pmemblk_createW(const wchar_t *path, size_t bsize, size_t poolsize, mode_t mode) { char *upath = util_toUTF8(path); if (upath == NULL) return NULL; PMEMblkpool *ret = pmemblk_createU(upath, bsize, poolsize, mode); util_free_UTF8(upath); return ret; }
/* * pmem_map_fileW -- create or open the file and map it to memory */ void * pmem_map_fileW(const wchar_t *path, size_t len, int flags, mode_t mode, size_t *mapped_lenp, int *is_pmemp) { char *upath = util_toUTF8(path); if (upath == NULL) return NULL; void *ret = pmem_map_fileU(upath, len, flags, mode, mapped_lenp, is_pmemp); util_free_UTF8(upath); return ret; }
/* * pmempool_transformW -- alter poolset structure in widechar */ int pmempool_transformW(const wchar_t *poolset_src, const wchar_t *poolset_dst, unsigned flags) { char *path_src = util_toUTF8(poolset_src); if (path_src == NULL) { ERR("Invalid source poolest file path."); return -1; } char *path_dst = util_toUTF8(poolset_dst); if (path_dst == NULL) { ERR("Invalid destination poolest file path."); Free(path_src); return -1; } int ret = pmempool_transformU(path_src, path_dst, flags); util_free_UTF8(path_src); util_free_UTF8(path_dst); return ret; }
/* * pmempool_syncW -- synchronize replicas within a poolset in widechar */ int pmempool_syncW(const wchar_t *poolset, unsigned flags) { char *path = util_toUTF8(poolset); if (path == NULL) { ERR("Invalid poolest file path."); return -1; } int ret = pmempool_syncU(path, flags); util_free_UTF8(path); return ret; }
/* * pmempool_rmW -- remove pool files or poolsets in widechar */ int pmempool_rmW(const wchar_t *path, int flags) { char *upath = util_toUTF8(path); if (upath == NULL) { ERR("Invalid poolest/pool file path."); return -1; } int ret = pmempool_rmU(upath, flags); util_free_UTF8(upath); return ret; }