summaryrefslogtreecommitdiff
path: root/tools/hal-storage-mount.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/hal-storage-mount.c')
-rw-r--r--tools/hal-storage-mount.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/hal-storage-mount.c b/tools/hal-storage-mount.c
index c543707c..3ecea02c 100644
--- a/tools/hal-storage-mount.c
+++ b/tools/hal-storage-mount.c
@@ -953,6 +953,9 @@ handle_mount (LibHalContext *hal_ctx,
if (fwrite (hal_mtab_buf, 1, strlen (hal_mtab_buf), hal_mtab) != strlen (hal_mtab_buf)) {
unknown_error ("Cannot write to /media/.hal-mtab~");
}
+ if (fflush (hal_mtab) < 0) {
+ unknown_error ("Cannot flush /media/.hal-mtab~");
+ }
if (fsync (fileno (hal_mtab)) < 0) {
printf ("WARNING! syncing /media/.hal-mtab~ failed: %s\n", strerror (errno));
}