clang-format the rest of the files
Apply clang-format to fix the remaining files not fixed by
change I23cde3f0bbcac13bef555d13514e922c79d5ad48
Test: Format-only changes; treehugger suffices.
Change-Id: I1bfd5c8d68d298596875d5edae26cdfe27c03489
Merged-In: I1bfd5c8d68d298596875d5edae26cdfe27c03489
diff --git a/model/EmulatedVolume.cpp b/model/EmulatedVolume.cpp
index 6e1ffce..7ec109c 100644
--- a/model/EmulatedVolume.cpp
+++ b/model/EmulatedVolume.cpp
@@ -27,8 +27,8 @@
#include <stdlib.h>
#include <sys/mount.h>
#include <sys/stat.h>
-#include <sys/types.h>
#include <sys/sysmacros.h>
+#include <sys/types.h>
#include <sys/wait.h>
using android::base::StringPrintf;
@@ -38,22 +38,21 @@
static const char* kFusePath = "/system/bin/sdcard";
-EmulatedVolume::EmulatedVolume(const std::string& rawPath) :
- VolumeBase(Type::kEmulated), mFusePid(0) {
+EmulatedVolume::EmulatedVolume(const std::string& rawPath)
+ : VolumeBase(Type::kEmulated), mFusePid(0) {
setId("emulated");
mRawPath = rawPath;
mLabel = "emulated";
}
-EmulatedVolume::EmulatedVolume(const std::string& rawPath, dev_t device,
- const std::string& fsUuid) : VolumeBase(Type::kEmulated), mFusePid(0) {
+EmulatedVolume::EmulatedVolume(const std::string& rawPath, dev_t device, const std::string& fsUuid)
+ : VolumeBase(Type::kEmulated), mFusePid(0) {
setId(StringPrintf("emulated:%u,%u", major(device), minor(device)));
mRawPath = rawPath;
mLabel = fsUuid;
}
-EmulatedVolume::~EmulatedVolume() {
-}
+EmulatedVolume::~EmulatedVolume() {}
status_t EmulatedVolume::doMount() {
// We could have migrated storage to an adopted private volume, so always
@@ -71,8 +70,8 @@
setPath(StringPrintf("/storage/%s", label.c_str()));
if (fs_prepare_dir(mFuseDefault.c_str(), 0700, AID_ROOT, AID_ROOT) ||
- fs_prepare_dir(mFuseRead.c_str(), 0700, AID_ROOT, AID_ROOT) ||
- fs_prepare_dir(mFuseWrite.c_str(), 0700, AID_ROOT, AID_ROOT)) {
+ fs_prepare_dir(mFuseRead.c_str(), 0700, AID_ROOT, AID_ROOT) ||
+ fs_prepare_dir(mFuseWrite.c_str(), 0700, AID_ROOT, AID_ROOT)) {
PLOG(ERROR) << getId() << " failed to create mount points";
return -errno;
}
@@ -80,6 +79,7 @@
dev_t before = GetDevice(mFuseWrite);
if (!(mFusePid = fork())) {
+ // clang-format off
if (execl(kFusePath, kFusePath,
"-u", "1023", // AID_MEDIA_RW
"-g", "1023", // AID_MEDIA_RW
@@ -90,6 +90,7 @@
mRawPath.c_str(),
label.c_str(),
NULL)) {
+ // clang-format on
PLOG(ERROR) << "Failed to exec";
}
@@ -105,7 +106,7 @@
nsecs_t start = systemTime(SYSTEM_TIME_BOOTTIME);
while (before == GetDevice(mFuseWrite)) {
LOG(VERBOSE) << "Waiting for FUSE to spin up...";
- usleep(50000); // 50ms
+ usleep(50000); // 50ms
nsecs_t now = systemTime(SYSTEM_TIME_BOOTTIME);
if (nanoseconds_to_milliseconds(now - start) > 5000) {