summaryrefslogtreecommitdiffstats
path: root/helper/ext2.c
diff options
context:
space:
mode:
Diffstat (limited to 'helper/ext2.c')
-rw-r--r--helper/ext2.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/helper/ext2.c b/helper/ext2.c
index 2395871..56ad5e5 100644
--- a/helper/ext2.c
+++ b/helper/ext2.c
@@ -107,8 +107,16 @@ ext2_start (const char *hostcpu, const char *appliance,
static void
ext2_end (void)
{
+ if (verbose)
+ print_timestamped_message ("closing ext2 filesystem");
+
/* Write out changes and close. */
- errcode_t err = ext2fs_close (fs);
+ errcode_t err;
+#ifdef HAVE_EXT2FS_CLOSE2
+ err = ext2fs_close2 (fs, EXT2_FLAG_FLUSH_NO_SYNC);
+#else
+ err = ext2fs_close (fs);
+#endif
if (err != 0)
error (EXIT_FAILURE, 0, "ext2fs_close: %s", error_message (err));
}