[automerger skipped] Fix a potential wild pointer error when markSlotSuccessful comes late am: 28d49bc315 -s ours am: c8b92aab58 -s ours
am skip reason: skip tag Change-Id I12c01c5f062ec4b41718f2cada817f6557eb2b0e with SHA-1 65e8b6c195 is already in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/update_engine/+/14078192
Change-Id: I690d8b72a89eaf830a4b95b0bc7123d888b9371b
diff --git a/common/fake_hardware.h b/common/fake_hardware.h
index a0d79fe..6c25183 100644
--- a/common/fake_hardware.h
+++ b/common/fake_hardware.h
@@ -219,8 +219,8 @@
const char* GetPartitionMountOptions(
const std::string& partition_name) const override {
#ifdef __ANDROID__
- // TODO(b/181182967): This matches the declaration in hardware_android.cc
- // but ideally shouldn't be duplicated.
+ // TODO(allight): This matches the declaration in hardware_android.cc but
+ // ideally shouldn't be duplicated.
return "defcontext=u:object_r:postinstall_file:s0";
#else
return "";
diff --git a/scripts/brillo_update_payload b/scripts/brillo_update_payload
index d1a1781..746cefb 100755
--- a/scripts/brillo_update_payload
+++ b/scripts/brillo_update_payload
@@ -89,12 +89,14 @@
exit 1
}
-# Loads shflags. We first look at the default install location; then look for
-# crosutils (chroot); finally check our own directory.
+# Loads shflags. We first look at the default install location; then our own
+# directory; finally the parent directory.
load_shflags() {
local my_dir="$(dirname "$(readlink -f "$0")")"
local path
- for path in /usr/share/misc "${my_dir}"/lib/shflags; do
+ for path in /usr/share/misc \
+ "${my_dir}"/lib/shflags \
+ "${my_dir}"/../lib/shflags; do
if [[ -r "${path}/shflags" ]]; then
. "${path}/shflags" || die "Could not load ${path}/shflags."
return