Use std::string to return crypto device, not char *
Bug: 147814592
Test: can create private volume on Cuttlefish
Change-Id: Ic2bca81c0f0319e1b988e9204a2f4e91af57d157
diff --git a/model/PrivateVolume.cpp b/model/PrivateVolume.cpp
index de2a09f..7fd46a2 100644
--- a/model/PrivateVolume.cpp
+++ b/model/PrivateVolume.cpp
@@ -76,9 +76,7 @@
// TODO: figure out better SELinux labels for private volumes
unsigned char* key = (unsigned char*)mKeyRaw.data();
- char crypto_blkdev[MAXPATHLEN];
- int res = cryptfs_setup_ext_volume(getId().c_str(), mRawDevPath.c_str(), key, crypto_blkdev);
- mDmDevPath = crypto_blkdev;
+ int res = cryptfs_setup_ext_volume(getId().c_str(), mRawDevPath.c_str(), key, &mDmDevPath);
if (res != 0) {
PLOG(ERROR) << getId() << " failed to setup cryptfs";
return -EIO;