summaryrefslogtreecommitdiffstats
path: root/winsup/utils/path.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2010-04-29 10:39:35 +0000
committerCorinna Vinschen <corinna@vinschen.de>2010-04-29 10:39:35 +0000
commita361b4715f2b1a9b62e2384d9878852a4d3445f0 (patch)
tree8f16d667036300c0e9b83725d896a085b1f151a9 /winsup/utils/path.cc
parent5b4c992bf6d29dcdde87288c340051e9bc524f27 (diff)
downloadcygnal-a361b4715f2b1a9b62e2384d9878852a4d3445f0.tar.gz
cygnal-a361b4715f2b1a9b62e2384d9878852a4d3445f0.tar.bz2
cygnal-a361b4715f2b1a9b62e2384d9878852a4d3445f0.zip
* path.cc: Include sys/cygwin.h if built for mount(1).
(struct opt): Add "dos" and "ihash" options. (from_fstab_line): Call cygwin_internal rather than read_flags if built for mount(1).
Diffstat (limited to 'winsup/utils/path.cc')
-rw-r--r--winsup/utils/path.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/winsup/utils/path.cc b/winsup/utils/path.cc
index 0360119dd..da40b340d 100644
--- a/winsup/utils/path.cc
+++ b/winsup/utils/path.cc
@@ -1,6 +1,6 @@
/* path.cc
- Copyright 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009 Red Hat, Inc.
+ Copyright 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010 Red Hat, Inc.
This file is part of Cygwin.
@@ -26,6 +26,9 @@ details. */
#include "cygwin/include/sys/mount.h"
#include "cygwin/include/mntent.h"
#include "testsuite.h"
+#ifdef FSTAB_ONLY
+#include <sys/cygwin.h>
+#endif
#ifndef FSTAB_ONLY
/* Used when treating / and \ as equivalent. */
@@ -306,7 +309,9 @@ static struct opt
{"auto", 0, 0},
{"binary", MOUNT_BINARY, 0},
{"cygexec", MOUNT_CYGWIN_EXEC, 0},
+ {"dos", MOUNT_DOS, 0},
{"exec", MOUNT_EXEC, 0},
+ {"ihash", MOUNT_IHASH, 0},
{"noacl", MOUNT_NOACL, 0},
{"nosuid", 0, 0},
{"notexec", MOUNT_NOTEXEC, 0},
@@ -381,7 +386,11 @@ from_fstab_line (mnt_t *m, char *line, bool user)
cend = find_ws (c);
*cend = '\0';
unsigned mount_flags = MOUNT_SYSTEM;
+#ifndef FSTAB_ONLY
if (!read_flags (c, mount_flags))
+#else
+ if (cygwin_internal (CW_CVT_MNT_OPTS, &c, &mount_flags))
+#endif
return false;
if (user)
mount_flags &= ~MOUNT_SYSTEM;