Merge "libprocessgroup users use libcutils" into qt-dev
diff --git a/init/property_service.cpp b/init/property_service.cpp
index fce8d57..f2c7462 100644
--- a/init/property_service.cpp
+++ b/init/property_service.cpp
@@ -642,8 +642,14 @@
while (isspace(*key)) key++;
}
- load_properties_from_file(fn, key, properties);
+ std::string raw_filename(fn);
+ std::string expanded_filename;
+ if (!expand_props(raw_filename, &expanded_filename)) {
+ LOG(ERROR) << "Could not expand filename '" << raw_filename << "'";
+ continue;
+ }
+ load_properties_from_file(expanded_filename.c_str(), key, properties);
} else {
value = strchr(key, '=');
if (!value) continue;
diff --git a/libprocessgroup/cgroup_map.cpp b/libprocessgroup/cgroup_map.cpp
index 92fcd1e..9797d76 100644
--- a/libprocessgroup/cgroup_map.cpp
+++ b/libprocessgroup/cgroup_map.cpp
@@ -70,8 +70,8 @@
bool CgroupController::IsUsable() const {
if (!HasValue()) return false;
- uint32_t flags = ACgroupController_getFlags(controller_);
- return (flags & CGROUPRC_CONTROLLER_FLAG_MOUNTED) != 0;
+ static bool enabled = (access(GetProcsFilePath("", 0, 0).c_str(), F_OK) == 0);
+ return enabled;
}
std::string CgroupController::GetTasksFilePath(const std::string& rel_path) const {
@@ -160,7 +160,6 @@
const ACgroupController* controller = ACgroupFile_getController(i);
LOG(INFO) << "\t" << ACgroupController_getName(controller) << " ver "
<< ACgroupController_getVersion(controller) << " path "
- << ACgroupController_getFlags(controller) << " flags "
<< ACgroupController_getPath(controller);
}
}
diff --git a/libprocessgroup/cgrouprc/cgroup_controller.cpp b/libprocessgroup/cgrouprc/cgroup_controller.cpp
index 5a326e5..d064d31 100644
--- a/libprocessgroup/cgrouprc/cgroup_controller.cpp
+++ b/libprocessgroup/cgrouprc/cgroup_controller.cpp
@@ -27,11 +27,6 @@
return controller->version();
}
-uint32_t ACgroupController_getFlags(const ACgroupController* controller) {
- CHECK(controller != nullptr);
- return controller->flags();
-}
-
const char* ACgroupController_getName(const ACgroupController* controller) {
CHECK(controller != nullptr);
return controller->name();
diff --git a/libprocessgroup/cgrouprc/include/android/cgrouprc.h b/libprocessgroup/cgrouprc/include/android/cgrouprc.h
index ffc9f0b..0f6a9cd 100644
--- a/libprocessgroup/cgrouprc/include/android/cgrouprc.h
+++ b/libprocessgroup/cgrouprc/include/android/cgrouprc.h
@@ -66,18 +66,11 @@
__INTRODUCED_IN(29);
/**
- * Flag bitmask used in ACgroupController_getFlags
+ * Flag bitmask to be used when ACgroupController_getFlags can be exported
*/
#define CGROUPRC_CONTROLLER_FLAG_MOUNTED 0x1
/**
- * Returns the flags bitmask of the given controller.
- * If the given controller is null, return 0.
- */
-__attribute__((warn_unused_result)) uint32_t ACgroupController_getFlags(const ACgroupController*)
- __INTRODUCED_IN(29);
-
-/**
* Returns the name of the given controller.
* If the given controller is null, return nullptr.
*/
diff --git a/libprocessgroup/cgrouprc/libcgrouprc.llndk.txt b/libprocessgroup/cgrouprc/libcgrouprc.llndk.txt
index ea3df33..91df392 100644
--- a/libprocessgroup/cgrouprc/libcgrouprc.llndk.txt
+++ b/libprocessgroup/cgrouprc/libcgrouprc.llndk.txt
@@ -4,7 +4,6 @@
ACgroupFile_getControllerCount;
ACgroupFile_getController;
ACgroupController_getVersion;
- ACgroupController_getFlags;
ACgroupController_getName;
ACgroupController_getPath;
local:
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 2601997..c042c48 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -345,8 +345,11 @@
trigger early-boot
trigger boot
-on post-fs
+on early-fs
+ # Once metadata has been mounted, we'll need vold to deal with userdata checkpointing
start vold
+
+on post-fs
exec - system system -- /system/bin/vdc checkpoint markBootAttempt
# Once everything is setup, no need to modify /.