Merge "Rename two local variables" into sc-dev am: d95943088e
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15584611 Change-Id: I1a7057d9dd955d425446985cf2ab16955efaa8ce
This commit is contained in:
commit
caef6def08
1 changed files with 7 additions and 7 deletions
|
|
@ -2065,22 +2065,22 @@ static bool PrepareZramBackingDevice(off64_t size) {
|
||||||
|
|
||||||
// Allocate loop device and attach it to file_path.
|
// Allocate loop device and attach it to file_path.
|
||||||
LoopControl loop_control;
|
LoopControl loop_control;
|
||||||
std::string device;
|
std::string loop_device;
|
||||||
if (!loop_control.Attach(target_fd.get(), 5s, &device)) {
|
if (!loop_control.Attach(target_fd.get(), 5s, &loop_device)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// set block size & direct IO
|
// set block size & direct IO
|
||||||
unique_fd device_fd(TEMP_FAILURE_RETRY(open(device.c_str(), O_RDWR | O_CLOEXEC)));
|
unique_fd loop_fd(TEMP_FAILURE_RETRY(open(loop_device.c_str(), O_RDWR | O_CLOEXEC)));
|
||||||
if (device_fd.get() == -1) {
|
if (loop_fd.get() == -1) {
|
||||||
PERROR << "Cannot open " << device;
|
PERROR << "Cannot open " << loop_device;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!LoopControl::EnableDirectIo(device_fd.get())) {
|
if (!LoopControl::EnableDirectIo(loop_fd.get())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return InstallZramDevice(device);
|
return InstallZramDevice(loop_device);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool fs_mgr_swapon_all(const Fstab& fstab) {
|
bool fs_mgr_swapon_all(const Fstab& fstab) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue