From 4c35f9f01f9f9656f80291701a8edbe4c7e13668 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 8 Nov 2000 20:39:45 +0000 Subject: [PATCH] * 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. --- winsup/utils/ChangeLog | 10 ++++++++++ winsup/utils/mount.cc | 24 ++++++++++++++---------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index ad8620d9b..f57371048 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,13 @@ +Wed Nov 8 08:49:27 2000 Jason Tishler + + * 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. + Wed Nov 8 15:52:00 2000 Corinna Vinschen * mkgroup.c (load_netapi): New function to load netapi32.dll functions 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 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); }