support ext4 on checking mount point

In imageloader, checks EXT4_SUPER_MAGIC in addition to SQUASHFS_MAGIC.

BUG=chromium:779701
TEST=load cros-termina mulitple times after its already mounted  on DuT.

Change-Id: I7cd0d7a2fb0ead072506d18a4e738b2c9af5e8f2
Reviewed-on: https://chromium-review.googlesource.com/744982
Commit-Ready: Xiaochu Liu <xiaochu@chromium.org>
Tested-by: Xiaochu Liu <xiaochu@chromium.org>
Reviewed-by: Greg Kerr <kerrnel@chromium.org>
diff --git a/verity_mounter.cc b/verity_mounter.cc
index 14d6284..2c11d43 100644
--- a/verity_mounter.cc
+++ b/verity_mounter.cc
@@ -310,8 +310,10 @@
         PLOG(ERROR) << "statfs";
         return false;
       }
-      if (st_fs.f_type != SQUASHFS_MAGIC || !(st_fs.f_flags & ST_NODEV) ||
-          !(st_fs.f_flags & ST_NOSUID) || !(st_fs.f_flags & ST_RDONLY)) {
+      if ((st_fs.f_type != SQUASHFS_MAGIC && st_fs.f_type != EXT4_SUPER_MAGIC)
+          || !(st_fs.f_flags & ST_NODEV)
+          || !(st_fs.f_flags & ST_NOSUID)
+          || !(st_fs.f_flags & ST_RDONLY)) {
         LOG(ERROR) << "File system is not the expected type.";
         return false;
       }