Merge "vold: remove f2fs reserved_blocks from storage total size" into main
diff --git a/Checkpoint.cpp b/Checkpoint.cpp
index 27d99e7..76e46fb 100644
--- a/Checkpoint.cpp
+++ b/Checkpoint.cpp
@@ -307,21 +307,21 @@
std::string content;
auto module = BootControlClient::WaitForService();
- if (isCheckpointing) return isCheckpointing;
+ if (isCheckpointing) return true;
+
// In case of INVALID slot or other failures, we do not perform checkpoint.
if (module && !module->IsSlotMarkedSuccessful(module->GetCurrentSlot()).value_or(true)) {
isCheckpointing = true;
return true;
}
ret = android::base::ReadFileToString(kMetadataCPFile, &content);
- if (ret) {
- ret = content != "0";
- isCheckpointing = ret;
- if (!isCheckpointing) {
- notifyCheckpointListeners();
- }
- return ret;
+ if (ret && content != "0") {
+ isCheckpointing = true;
+ return true;
}
+
+ // Leave isCheckpointing false and notify listeners now that we know we don't need one
+ notifyCheckpointListeners();
return false;
}
diff --git a/tests/VoldFuzzer.cpp b/tests/VoldFuzzer.cpp
index b47a783..173c765 100644
--- a/tests/VoldFuzzer.cpp
+++ b/tests/VoldFuzzer.cpp
@@ -37,6 +37,8 @@
}
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
+ // TODO(b/183141167): need to rewrite 'dump' to avoid SIGPIPE.
+ signal(SIGPIPE, SIG_IGN);
auto voldService = sp<android::vold::VoldNativeService>::make();
auto voldVendorService = sp<android::vold::VendorVoldNativeService>::make();
fuzzService({voldService, voldVendorService}, FuzzedDataProvider(data, size));