musl libc defines NULL as nullptr, which is explicitly allowed by
C++11. nullptr_t cannot be implicitly cast to an integral type.
Use 0 instead.
Bug: 190084016
Test: m USE_HOST_MUSL=true host-native
Change-Id: I0c3b6c94cd69262f574414bf52494333f2f2645a
This change provide a specialization of android::base::OkOrFail for
status_t. As a result, a statement whose type is status_t can be used
with OR_RETURN.
The specialization also provides conversion operators to Result<T,
StatusT> where StatusT is a wrapper type for status_t. This allows
OR_RETURN macro to be used in newer functions that returns Result<T,
StatusT>.
Example usage:
\#include <utils/ErrorsMacros.h>
status_t legacy_inner();
status_t legacy_outer() {
OR_RETURN(legacy_inner());
return OK;
}
Result<T, StatusT> new_outer() {
OR_RETURN(legacy_inner()); // the same macro
return T{...};
}
Bug: 209929099
Test: atest libutils_test
Change-Id: I0def0e84ce3f0c4ff6d508c202bd51902dfc9618
* changes:
Mount /mnt/scracth with -o sync,nodiscard
Run check_fs only /data is mounted
Don't use FSCK_LOG_FILE used for ext4 only
Don't try to mount if the disk has no FS magic
Retry to unmount /data
"-o discard" issues UNMAP commands to loopback resulting in punch_hole
on the pinned file in /data. That will break the pinned block map.
Bug: 210589189
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: Ia927c43fc75164ce5929173f5740737eac4de484
If we fail to umount /data, device won't boot up at all.
Bug: 208161227
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I92d34a253039eb677d4df9fad8a0821fbc684f57
Change should be no-op, it just export some private methods.
Bug: 211741246
Test: ./run_tests.sh
Test: presubmit
Change-Id: Ia4ac739018f188a0154625ec574fc4bebf7c62ee
Adding `--host` for host-side test cases with atest, so we
still can run the test when there is no device connected.
Otherwise, TradeFed will emit the follow error:
TradeFed subprocess exited early with exit code=7(NO_DEVICE_ALLOCATED).
Bug: None
Test: ./system/core/fs_mgr/libfs_avb/run_tests.sh
Change-Id: I0a593e6dc42861c2dc9cfff308cd7fd76b39ef2c
win_sdk is deprecated, if given on the command line
sdk will be build instead.
Bug: 212724080
Test: Presubmits
Change-Id: Ia92b879fe08f0a1d9ebefc90e369adf1d4aa4112
The funciton is now used for init_boot and boot partitions, so the name
and the error messages should be more generic.
Bug: 203698939
Test: m
Change-Id: I168fdcb08accb11b2c9cfc402168744274f59665
STL implementation of insert() is generally smart enough to reserve
storage before hand. No need to do reserve() followed by for each loop
Test: th
Change-Id: I36e88c121868b97ea525b292a67b36983c530e56
Similar to GKI boot.img, init_boot.img is released as a specific size
and should be able to be flashed into partitions that have different
sizes. So the AVB footer is moved from the end of the init_boot.img to
the end of the partition in the case that the partition is larger than
the image.
Bug: 203698939
Test: m
Change-Id: Ib5a63a7bf1b4be4eba4941972750f12e3edb3a17
This CHECK prevents a release build from resuming a two-phase merge if
the merge initially failed in the first pass.
Bug: 213031779
Test: vts_libsnapshot_test
Test: update_engine_unittests
Change-Id: I8bf00e3016546ef7039bb0b18eb977cc3dc1066a
Revert submission 1935201
Reason for revert: DroidMonitor: Potential culprit for Bug http://b/213259099 - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Reverted Changes:
I219f956ba:libsnapshot: Fix libsnapshot_fuzzer_test.
I281937e26:libsnapshot: Fix checks for compression to work wi...
Change-Id: I88955a533ce7103111509785ed5bb40e1779b130
Revert submission 1935201
Reason for revert: DroidMonitor: Potential culprit for Bug http://b/213259099 - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Reverted Changes:
I219f956ba:libsnapshot: Fix libsnapshot_fuzzer_test.
I281937e26:libsnapshot: Fix checks for compression to work wi...
Change-Id: I33731556761cbdf603424fda94117973d3f21e21