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:
authorChristopher Faylor <me@cgf.cx>2000-11-08 23:39:45 +0300
committerChristopher Faylor <me@cgf.cx>2000-11-08 23:39:45 +0300
commit4c35f9f01f9f9656f80291701a8edbe4c7e13668 (patch)
treee6a5198fa035f825cd805217ff00759db722e1f9 /winsup/utils/mount.cc
parent9bc846bd3d5fc13eb28b4ddece0ecfc52caf898a (diff)
* mount.cc (main): Call show_cygdrive_info instead of show_cygdrive_prefixes.
* mount.cc (show_cygdrive_prefixes): Remove function. * mount.cc (show_cygdrive_info): New function. Actually, show_cygdrive_info is really an enhanced version of show_cygdrive_prefixes renamed to show_cygdrive_info that also displays the user and system flags.
Diffstat (limited to 'winsup/utils/mount.cc')
-rw-r--r--winsup/utils/mount.cc24
1 files changed, 14 insertions, 10 deletions
diff --git a/winsup/utils/mount.cc b/winsup/utils/mount.cc
index bf86d02fc..4117c01c5 100644
--- a/winsup/utils/mount.cc
+++ b/winsup/utils/mount.cc
@@ -22,7 +22,7 @@ details. */
#include <errno.h>
static void show_mounts (void);
-static void show_cygdrive_prefixes (void);
+static void show_cygdrive_info (void);
static void change_cygdrive_prefix (const char *new_prefix, int flags);
static int mount_already_exists (const char *posix_path, int flags);
@@ -144,7 +144,7 @@ main (int argc, const char **argv)
if ((i + 1) != argc)
usage ();
- show_cygdrive_prefixes ();
+ show_cygdrive_info ();
}
else if (strcmp (argv[i], "-b") == 0)
flags |= MOUNT_BINARY;
@@ -263,23 +263,27 @@ change_cygdrive_prefix (const char *new_prefix, int flags)
exit (0);
}
-/* show_cygdrive_prefixes: Show the user and/or cygdrive path prefixes */
+/* show_cygdrive_info: Show the user and/or cygdrive info, i.e., prefixes and
+ flags.*/
static void
-show_cygdrive_prefixes ()
+show_cygdrive_info ()
{
- /* Get the Cygdrive user and system path prefixes */
+ /* Get the cygdrive info */
char user[MAX_PATH];
char system[MAX_PATH];
- cygwin_internal (CW_GET_CYGDRIVE_PREFIXES, user, system);
+ char user_flags[MAX_PATH];
+ char system_flags[MAX_PATH];
+ cygwin_internal (CW_GET_CYGDRIVE_INFO, user, system, user_flags,
+ system_flags);
/* Display the user and system cygdrive path prefixes, if necessary
(ie, not empty) */
- const char *format = "%-18s %-11s\n";
- printf (format, "Prefix", "Type");
+ const char *format = "%-18s %-11s %s\n";
+ printf (format, "Prefix", "Type", "Flags");
if (strlen (user) > 0)
- printf (format, user, "user");
+ printf (format, user, "user", user_flags);
if (strlen (system) > 0)
- printf (format, system, "system");
+ printf (format, system, "system", system_flags);
exit (0);
}