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:36:37 +0300
committerChristopher Faylor <me@cgf.cx>2000-11-08 23:36:37 +0300
commit9bc846bd3d5fc13eb28b4ddece0ecfc52caf898a (patch)
tree2fd164536ce8697b5dc316629c913edf27dbdbeb /winsup/cygwin/external.cc
parent315f8fd37b75a6cfe589afb9eb18cc9bb59874ac (diff)
* environ.cc (_addenv): malloc space for setenv if cygwin1.dll is used in
conjunction with older binaries. (environ_init): Ditto. * external.cc (get_cygdrive_info): New function. * external.cc (get_cygdrive_prefixes): Change to use get_cygdrive_info but toss the user and system flags. * external.cc (cygwin_internal): Add new CW_GET_CYGDRIVE_INFO case. * path.cc (mount_info::get_cygdrive_prefixes): Remove method. * path.cc (mount_info::get_cygdrive_info): New method. Actually, get_cygdrive_info is really an enhanced version of get_cygdrive_prefixes renamed to get_cygdrive_info that also gets the user and system flags. * shared_info.h (get_cygdrive_prefixes): Remove method. * shared_info.h (get_cygdrive_info): New method. * include/cygwin/version.h: Bump minor API version due to adding CW_GET_CYGDRIVE_INFO to cygwin_internal. * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_GET_CYGDRIVE_INFO.
Diffstat (limited to 'winsup/cygwin/external.cc')
-rw-r--r--winsup/cygwin/external.cc24
1 files changed, 22 insertions, 2 deletions
diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc
index 0199aedd3..cf026eb20 100644
--- a/winsup/cygwin/external.cc
+++ b/winsup/cygwin/external.cc
@@ -88,13 +88,24 @@ fillout_pinfo (pid_t pid, int winpid)
}
static DWORD
-get_cygdrive_prefixes (char *user, char *system)
+get_cygdrive_info (char *user, char *system, char *user_flags,
+ char *system_flags)
{
shared_info *info = cygwin_getshared();
- int res = info->mount.get_cygdrive_prefixes(user, system);
+ int res = info->mount.get_cygdrive_info (user, system, user_flags,
+ system_flags);
return (res == ERROR_SUCCESS) ? 1 : 0;
}
+static DWORD
+get_cygdrive_prefixes (char *user, char *system)
+{
+ char user_flags[MAX_PATH];
+ char system_flags[MAX_PATH];
+ DWORD res = get_cygdrive_info (user, system, user_flags, system_flags);
+ return res;
+}
+
extern "C" DWORD
cygwin_internal (cygwin_getinfo_types t, ...)
{
@@ -151,6 +162,15 @@ cygwin_internal (cygwin_getinfo_types t, ...)
init_exceptions ((exception_list *) arg);
return 0;
+ case CW_GET_CYGDRIVE_INFO:
+ {
+ char *user = va_arg (arg, char *);
+ char *system = va_arg (arg, char *);
+ char *user_flags = va_arg (arg, char *);
+ char *system_flags = va_arg (arg, char *);
+ return get_cygdrive_info (user, system, user_flags, system_flags);
+ }
+
default:
return (DWORD) -1;
}