Rename functions with a system/extras name collision.
Following around the call graph in code search is hard enough as it is!
Change-Id: I09d3513664423aafe0d99f9158acfbbb6c79b590
diff --git a/CryptCommandListener.cpp b/CryptCommandListener.cpp
index b6397f0..d60f2fc 100644
--- a/CryptCommandListener.cpp
+++ b/CryptCommandListener.cpp
@@ -350,7 +350,7 @@
}
SLOGD("cryptfs setusercryptopolicies");
dumpArgs(argc, argv, -1);
- rc = e4crypt_set_user_crypto_policies(argv[2]);
+ rc = e4crypt_vold_set_user_crypto_policies(argv[2]);
} else if (!strcmp(argv[1], "isConvertibleToFBE")) {
if (argc != 2) {
@@ -366,9 +366,9 @@
} else if (cmd == "create_user_key" && argc > 4) {
// create_user_key [user] [serial] [ephemeral]
return sendGenericOkFail(cli,
- e4crypt_create_user_key(atoi(argv[2]),
- atoi(argv[3]),
- atoi(argv[4]) != 0));
+ e4crypt_vold_create_user_key(atoi(argv[2]),
+ atoi(argv[3]),
+ atoi(argv[4]) != 0));
} else if (cmd == "destroy_user_key" && argc > 2) {
// destroy_user_key [user]
diff --git a/Ext4Crypt.cpp b/Ext4Crypt.cpp
index 3f6fbdc..38dc27d 100644
--- a/Ext4Crypt.cpp
+++ b/Ext4Crypt.cpp
@@ -630,12 +630,12 @@
return true;
}
-int e4crypt_set_user_crypto_policies(const char *dir)
+int e4crypt_vold_set_user_crypto_policies(const char *dir)
{
if (e4crypt_crypto_complete(DATA_MNT_POINT) != 0) {
return 0;
}
- SLOGD("e4crypt_set_user_crypto_policies");
+ SLOGD("e4crypt_vold_set_user_crypto_policies");
std::unique_ptr<DIR, int(*)(DIR*)> dirp(opendir(dir), closedir);
if (!dirp) {
SLOGE("Unable to read directory %s, error %s\n",
@@ -663,8 +663,8 @@
return 0;
}
-int e4crypt_create_user_key(userid_t user_id, int serial, bool ephemeral) {
- SLOGD("e4crypt_create_user_key(%d)", user_id);
+int e4crypt_vold_create_user_key(userid_t user_id, int serial, bool ephemeral) {
+ SLOGD("e4crypt_vold_create_user_key(%d)", user_id);
// TODO: create second key for user_de data
if (e4crypt_get_key(
get_key_path(DATA_MNT_POINT, user_id), true, ephemeral).empty()) {
diff --git a/Ext4Crypt.h b/Ext4Crypt.h
index a363d39..a3d9224 100644
--- a/Ext4Crypt.h
+++ b/Ext4Crypt.h
@@ -36,9 +36,9 @@
char* value, size_t len);
int e4crypt_set_field(const char* path, const char* fieldname,
const char* value);
-int e4crypt_set_user_crypto_policies(const char *path);
+int e4crypt_vold_set_user_crypto_policies(const char *path);
-int e4crypt_create_user_key(userid_t user_id, int serial, bool ephemeral);
+int e4crypt_vold_create_user_key(userid_t user_id, int serial, bool ephemeral);
int e4crypt_destroy_user_key(userid_t user_id);
int e4crypt_unlock_user_key(userid_t user_id, const char* token);