Fix some "false" returns to be "-1" where appropriate in e4crypt_enable
Also fix a PLOG that should be a LOG. Change-Id: Ic5ae288c37b6e236172f9e38349c2d0d530bfd4d
This commit is contained in:
parent
695d928286
commit
57eedbf8cb
1 changed files with 3 additions and 3 deletions
|
@ -366,11 +366,11 @@ int e4crypt_enable(const char* path)
|
|||
android::vold::destroyKey(key_temp);
|
||||
}
|
||||
|
||||
if (!android::vold::storeKey(key_temp, kEmptyAuthentication, device_key)) return false;
|
||||
if (!android::vold::storeKey(key_temp, kEmptyAuthentication, device_key)) return -1;
|
||||
if (rename(key_temp.c_str(), device_key_path.c_str()) != 0) {
|
||||
PLOG(ERROR) << "Unable to move new key to location: "
|
||||
<< device_key_path;
|
||||
return false;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -590,7 +590,7 @@ int e4crypt_lock_user_key(userid_t user_id) {
|
|||
emulated_lock(android::vold::BuildDataMiscCePath(user_id)) ||
|
||||
emulated_lock(android::vold::BuildDataMediaPath(nullptr, user_id)) ||
|
||||
emulated_lock(android::vold::BuildDataUserPath(nullptr, user_id))) {
|
||||
PLOG(ERROR) << "Failed to lock user " << user_id;
|
||||
LOG(ERROR) << "Failed to lock user " << user_id;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue