Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2010-08-09 12:18:30 +0400
committerCorinna Vinschen <corinna@vinschen.de>2010-08-09 12:18:30 +0400
commita52993d42652f6f34763f33cfac9c961c96e595b (patch)
tree25a48b31baaf328d9dc90dffe2c253acfc5be56d /winsup/cygwin/mount.cc
parent99006a85e255eb93d174b1de97df6821bc321933 (diff)
* fhandler_proc.cc: Add /proc/filesystems virtual file.
(format_proc_filesystems): New function. * mount.cc (fs_names): Move to global scope. Redefine as array of { "name", block_device? } structs. (fillout_mntent): Use name member of fs_names. * mount.h (fs_names): New prototype.
Diffstat (limited to 'winsup/cygwin/mount.cc')
-rw-r--r--winsup/cygwin/mount.cc38
1 files changed, 19 insertions, 19 deletions
diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc
index 561146a57..315125967 100644
--- a/winsup/cygwin/mount.cc
+++ b/winsup/cygwin/mount.cc
@@ -1472,6 +1472,24 @@ mount_info::del_item (const char *path, unsigned flags)
/************************* mount_item class ****************************/
+/* Order must be identical to mount.h, enum fs_info_type. */
+fs_names_t fs_names[] = {
+ { "none", false },
+ { "vfat", true },
+ { "ntfs", true },
+ { "smbfs", false },
+ { "nfs", false },
+ { "netapp", false },
+ { "iso9660", true },
+ { "udf", true },
+ { "csc-cache", false },
+ { "sunwnfs", false },
+ { "unixfs", false },
+ { "mvfs", false },
+ { "cifs", false },
+ { "nwfs", false }
+};
+
static mntent *
fillout_mntent (const char *native_path, const char *posix_path, unsigned flags)
{
@@ -1509,26 +1527,8 @@ fillout_mntent (const char *native_path, const char *posix_path, unsigned flags)
RtlAppendUnicodeToString (&unat, L"\\");
mntinfo.update (&unat, NULL);
- /* Order must be identical to mount.h, enum fs_info_type. */
- const char *fs_names[] = {
- "none",
- "vfat",
- "ntfs",
- "smbfs",
- "nfs",
- "netapp",
- "iso9660",
- "udf",
- "csc-cache",
- "sunwnfs",
- "unixfs",
- "mvfs",
- "cifs",
- "nwfs"
- };
-
if (mntinfo.what_fs () > 0 && mntinfo.what_fs () < max_fs_type)
- strcpy (_my_tls.locals.mnt_type, fs_names[mntinfo.what_fs ()]);
+ strcpy (_my_tls.locals.mnt_type, fs_names[mntinfo.what_fs ()].name);
else
strcpy (_my_tls.locals.mnt_type, mntinfo.fsname ());