Merge "Convert libpixelflinger to Android.bp"
diff --git a/adb/daemon/services.cpp b/adb/daemon/services.cpp
index 720ec6a..b300fac 100644
--- a/adb/daemon/services.cpp
+++ b/adb/daemon/services.cpp
@@ -104,7 +104,7 @@
std::string reboot_string = android::base::StringPrintf("reboot,%s", reboot_arg.c_str());
if (reboot_arg == "fastboot" &&
- android::base::GetBoolProperty("ro.boot.logical_partitions", false) &&
+ android::base::GetBoolProperty("ro.boot.dynamic_partitions", false) &&
access("/dev/socket/recovery", F_OK) == 0) {
LOG(INFO) << "Recovery specific reboot fastboot";
/*
diff --git a/fs_mgr/liblp/builder.cpp b/fs_mgr/liblp/builder.cpp
index b6d6da1..38e0bcb 100644
--- a/fs_mgr/liblp/builder.cpp
+++ b/fs_mgr/liblp/builder.cpp
@@ -713,6 +713,11 @@
return false;
}
+bool MetadataBuilder::HasBlockDevice(const std::string& partition_name) const {
+ uint32_t index;
+ return FindBlockDeviceByName(partition_name, &index);
+}
+
bool MetadataBuilder::GetBlockDeviceInfo(const std::string& partition_name,
BlockDeviceInfo* info) const {
uint32_t index;
diff --git a/fs_mgr/liblp/include/liblp/builder.h b/fs_mgr/liblp/include/liblp/builder.h
index 59717d1..297611b 100644
--- a/fs_mgr/liblp/include/liblp/builder.h
+++ b/fs_mgr/liblp/include/liblp/builder.h
@@ -248,6 +248,9 @@
// false is returned.
bool ImportPartitions(const LpMetadata& metadata, const std::set<std::string>& partition_names);
+ // Return true if a block device is found, else false.
+ bool HasBlockDevice(const std::string& partition_name) const;
+
private:
MetadataBuilder();
MetadataBuilder(const MetadataBuilder&) = delete;
diff --git a/init/builtins.cpp b/init/builtins.cpp
index 5676f92..6eb65b2 100644
--- a/init/builtins.cpp
+++ b/init/builtins.cpp
@@ -1060,7 +1060,8 @@
// where the APEXes are really mounted at. Otherwise, we will parse the
// same file twice.
static constexpr char glob_pattern[] = "/apex/*@*/etc/*.rc";
- if (glob(glob_pattern, GLOB_MARK, nullptr, &glob_result) != 0) {
+ const int ret = glob(glob_pattern, GLOB_MARK, nullptr, &glob_result);
+ if (ret != 0 && ret != GLOB_NOMATCH) {
globfree(&glob_result);
return Error() << "glob pattern '" << glob_pattern << "' failed";
}
diff --git a/init/reboot.cpp b/init/reboot.cpp
index a145797..45dc6d3 100644
--- a/init/reboot.cpp
+++ b/init/reboot.cpp
@@ -468,7 +468,7 @@
// adb reboot fastboot should boot into bootloader for devices not
// supporting logical partitions.
if (reboot_target == "fastboot" &&
- !android::base::GetBoolProperty("ro.boot.logical_partitions", false)) {
+ !android::base::GetBoolProperty("ro.boot.dynamic_partitions", false)) {
reboot_target = "bootloader";
}
// When rebooting to the bootloader notify the bootloader writing