summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/mount.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/mount.cc')
-rw-r--r--winsup/cygwin/mount.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc
index 70603d7ed..160fc4d83 100644
--- a/winsup/cygwin/mount.cc
+++ b/winsup/cygwin/mount.cc
@@ -1028,6 +1028,7 @@ struct opt
{"override", MOUNT_OVERRIDE, 0},
{"posix=0", MOUNT_NOPOSIX, 0},
{"posix=1", MOUNT_NOPOSIX, 1},
+ {"sparse", MOUNT_SPARSE, 0},
{"text", MOUNT_BINARY, 1},
{"user", MOUNT_SYSTEM, 1}
};
@@ -1667,6 +1668,9 @@ fillout_mntent (const char *native_path, const char *posix_path, unsigned flags)
if (flags & MOUNT_NOPOSIX)
strcat (_my_tls.locals.mnt_opts, (char *) ",posix=0");
+ if (flags & MOUNT_SPARSE)
+ strcat (_my_tls.locals.mnt_opts, (char *) ",sparse");
+
if (!(flags & MOUNT_SYSTEM)) /* user mount */
strcat (_my_tls.locals.mnt_opts, (char *) ",user");