update_engine: Attempt to mount the ROOTFS as squashfs during postinst.
This patch extends utils::MountFilesystem() to attempt to mount
the device as ext3, ext2 and squashfs before failing.
BUG=chromium:432016
TEST=None
Change-Id: Ibad2f359968d7abe9f82f11c895cac95130d73c5
Reviewed-on: https://chromium-review.googlesource.com/229020
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
diff --git a/utils.h b/utils.h
index 56bd22e..2c0af3e 100644
--- a/utils.h
+++ b/utils.h
@@ -185,7 +185,8 @@
bool IsRemovableDevice(const std::string& device);
// Synchronously mount or unmount a filesystem. Return true on success.
-// Mounts as ext3 with default options.
+// When mounting, it will attempt to mount the the device as "ext3", "ext2" and
+// "squashfs", with the passed |flags| options.
bool MountFilesystem(const std::string& device, const std::string& mountpoint,
unsigned long flags); // NOLINT(runtime/int)
bool UnmountFilesystem(const std::string& mountpoint);