From 637f5ce0fecddfb14d8f0b6a12d791fac469ad84 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 28 Jul 2000 22:33:43 +0000 Subject: * dcrt0.cc (dummy_autoload): Add load statement for RegDeleteValueA. * external.cc (get_cygdrive_prefixes): New function. (cygwin_internal): Add CW_GET_CYGDRIVE_PREFIXES case. * path.cc (mount_info::read_cygdrive_info_from_registry): Read system cygdrive prefix if user one is undefined. (mount_info::write_cygdrive_info_to_registry): Write cygdrive prefix to the appropriate registry hive. Overwrite in-memory copy of cygdrive, if appropriate. (mount_info::remove_cygdrive_info_from_registry): New method. (mount_info::get_cygdrive_prefixes): New method. (cygwin_umount): Remove cygdrive prefix, if appropriate. * registry.cc (reg_key::killvalue): New method. * shared.h (class reg_key): Add killvalue, remove_cygdrive_info_to_registry, and get_cygdrive_prefixes declarations. * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_GET_CYGDRIVE_PREFIXES. --- winsup/cygwin/external.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'winsup/cygwin/external.cc') diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc index e626cf5ef..f187d9779 100644 --- a/winsup/cygwin/external.cc +++ b/winsup/cygwin/external.cc @@ -63,6 +63,14 @@ fillout_pinfo (DWORD pid) return &ep; } +static DWORD +get_cygdrive_prefixes (char *user, char *system) +{ + shared_info *info = cygwin_getshared(); + int res = info->mount.get_cygdrive_prefixes(user, system); + return (res == ERROR_SUCCESS) ? 1 : 0; +} + extern "C" DWORD cygwin_internal (cygwin_getinfo_types t, ...) { @@ -107,6 +115,13 @@ cygwin_internal (cygwin_getinfo_types t, ...) perfile_table = va_arg (arg, struct __cygwin_perfile *); return 0; + case CW_GET_CYGDRIVE_PREFIXES: + { + char *user = va_arg (arg, char *); + char *system = va_arg (arg, char *); + return get_cygdrive_prefixes (user, system); + } + default: return (DWORD) -1; } -- cgit v1.2.3