diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2011-12-22 16:25:10 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2011-12-22 16:25:10 +0400 |
commit | 3a24189bbae9d1b1943e17038e78bb7d65f2a848 (patch) | |
tree | 6a8935c6f5899db38525d5b9daeae79cf1c0e707 /winsup/cygwin/external.cc | |
parent | 3a03267d6d695b678128db6a8b7028b8b5f93e1f (diff) |
* external.cc (cygwin_internal): Implement CW_ALLOC_DRIVE_MAP,
CW_MAP_DRIVE_MAP, CW_FREE_DRIVE_MAP.
* fhandler_process.cc: Include mount.h.
(get_volume_path_names_for_volume_name): Move to mount.cc.
(struct dos_drive_mappings): Ditto.
* mount.cc (get_volume_path_names_for_volume_name): Move here.
(dos_drive_mappings::dos_drive_mappings): Ditto.
(dos_drive_mappings::fixup_if_match): Ditto.
(dos_drive_mappings::~dos_drive_mappings): Ditto.
* mount.h (class dos_drive_mappings): Declare her.
* include/sys/cygwin.h (cygwin_getinfo_types): Add CW_ALLOC_DRIVE_MAP,
CW_MAP_DRIVE_MAP, CW_FREE_DRIVE_MAP.
* include/cygwin/version.h: Bump API minor number.
Diffstat (limited to 'winsup/cygwin/external.cc')
-rw-r--r-- | winsup/cygwin/external.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc index 947680420..e6e349395 100644 --- a/winsup/cygwin/external.cc +++ b/winsup/cygwin/external.cc @@ -528,6 +528,31 @@ cygwin_internal (cygwin_getinfo_types t, ...) } break; + case CW_ALLOC_DRIVE_MAP: + { + dos_drive_mappings *ddm = new dos_drive_mappings (); + res = (uintptr_t) ddm; + } + break; + + case CW_MAP_DRIVE_MAP: + { + dos_drive_mappings *ddm = va_arg (arg, dos_drive_mappings *); + wchar_t *pathbuf = va_arg (arg, wchar_t *); + if (ddm && pathbuf) + res = (uintptr_t) ddm->fixup_if_match (pathbuf); + } + break; + + case CW_FREE_DRIVE_MAP: + { + dos_drive_mappings *ddm = va_arg (arg, dos_drive_mappings *); + if (ddm) + delete ddm; + res = 0; + } + break; + default: set_errno (ENOSYS); } |