ART: Flush and close boot marker
Temporary fix.
Change-Id: I0a54d1562eb2081362c49b7b56c1ad0584c24bf5
diff --git a/runtime/gc/space/image_space.cc b/runtime/gc/space/image_space.cc
index a67e5d8..071997f 100644
--- a/runtime/gc/space/image_space.cc
+++ b/runtime/gc/space/image_space.cc
@@ -133,6 +133,11 @@
VLOG(startup) << "Creating boot start marker: " << boot_marker;
std::unique_ptr<File> f(OS::CreateEmptyFile(boot_marker.c_str()));
+ if (f.get() != nullptr) {
+ if (f->FlushCloseOrErase() != 0) {
+ PLOG(WARNING) << "Failed to write boot marker.";
+ }
+ }
}
static bool GenerateImage(const std::string& image_filename, InstructionSet image_isa,