clang-format many files.
Test: Format-only changes; treehugger suffices.
Change-Id: I23cde3f0bbcac13bef555d13514e922c79d5ad48
diff --git a/IdleMaint.cpp b/IdleMaint.cpp
index 459b3b8..ff2ebc5 100644
--- a/IdleMaint.cpp
+++ b/IdleMaint.cpp
@@ -33,11 +33,11 @@
#include <private/android_filesystem_config.h>
#include <dirent.h>
+#include <fcntl.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
-#include <fcntl.h>
using android::base::Basename;
using android::base::ReadFileToString;
@@ -80,8 +80,7 @@
static std::condition_variable cv_abort, cv_stop;
static std::mutex cv_m;
-static void addFromVolumeManager(std::list<std::string>* paths,
- PathTypes path_type) {
+static void addFromVolumeManager(std::list<std::string>* paths, PathTypes path_type) {
VolumeManager* vm = VolumeManager::Instance();
std::list<std::string> privateIds;
vm->listVolumes(VolumeBase::Type::kPrivate, privateIds);
@@ -95,11 +94,9 @@
const std::string& fs_type = vol->getFsType();
if (fs_type == "f2fs" && (Realpath(vol->getRawDmDevPath(), &gc_path) ||
Realpath(vol->getRawDevPath(), &gc_path))) {
- paths->push_back(std::string("/sys/fs/") + fs_type +
- "/" + Basename(gc_path));
+ paths->push_back(std::string("/sys/fs/") + fs_type + "/" + Basename(gc_path));
}
}
-
}
}
}
@@ -107,7 +104,7 @@
static void addFromFstab(std::list<std::string>* paths, PathTypes path_type) {
std::unique_ptr<fstab, decltype(&fs_mgr_free_fstab)> fstab(fs_mgr_read_fstab_default(),
fs_mgr_free_fstab);
- struct fstab_rec *prev_rec = NULL;
+ struct fstab_rec* prev_rec = NULL;
for (int i = 0; i < fstab->num_entries; i++) {
auto fs_type = std::string(fstab->recs[i].fs_type);
@@ -138,10 +135,11 @@
} else if (path_type == PathTypes::kBlkDevice) {
std::string gc_path;
if (std::string(fstab->recs[i].fs_type) == "f2fs" &&
- Realpath(android::vold::BlockDeviceForPath(
- std::string(fstab->recs[i].mount_point) + "/"), &gc_path)) {
- paths->push_back(std::string("/sys/fs/") + fstab->recs[i].fs_type +
- "/" + Basename(gc_path));
+ Realpath(
+ android::vold::BlockDeviceForPath(std::string(fstab->recs[i].mount_point) + "/"),
+ &gc_path)) {
+ paths->push_back(std::string("/sys/fs/") + fstab->recs[i].fs_type + "/" +
+ Basename(gc_path));
}
}
@@ -184,8 +182,8 @@
}
} else {
nsecs_t time = systemTime(SYSTEM_TIME_BOOTTIME) - start;
- LOG(INFO) << "Trimmed " << range.len << " bytes on " << path
- << " in " << nanoseconds_to_milliseconds(time) << "ms";
+ LOG(INFO) << "Trimmed " << range.len << " bytes on " << path << " in "
+ << nanoseconds_to_milliseconds(time) << "ms";
extras.putLong(String16("bytes"), range.len);
extras.putLong(String16("time"), time);
if (listener) {
@@ -230,8 +228,8 @@
}
lk.lock();
- aborted = cv_abort.wait_for(lk, 10s, []{
- return idle_maint_stat == IdleMaintStats::kAbort;});
+ aborted =
+ cv_abort.wait_for(lk, 10s, [] { return idle_maint_stat == IdleMaintStats::kAbort; });
lk.unlock();
}
@@ -267,7 +265,7 @@
static void runDevGcFstab(void) {
std::unique_ptr<fstab, decltype(&fs_mgr_free_fstab)> fstab(fs_mgr_read_fstab_default(),
fs_mgr_free_fstab);
- struct fstab_rec *rec = NULL;
+ struct fstab_rec* rec = NULL;
for (int i = 0; i < fstab->num_entries; i++) {
if (fs_mgr_has_sysfs_path(&fstab->recs[i])) {
@@ -427,8 +425,7 @@
cv_abort.notify_one();
lk.lock();
LOG(DEBUG) << "aborting idle maintenance";
- cv_stop.wait(lk, []{
- return idle_maint_stat == IdleMaintStats::kStopped;});
+ cv_stop.wait(lk, [] { return idle_maint_stat == IdleMaintStats::kStopped; });
}
lk.unlock();