* external.cc (get_cygdrive_info): Make inline.

(get_cygdrive_prefixes): Remove.
	(cygwin_internal): Call get_cygdrive_info with NULL flag parameters
	instead of get_cygdrive_prefixes.
	* path.cc (mount_info::get_cygdrive_info): Allow NULL flag parameters.
This commit is contained in:
Corinna Vinschen 2007-10-31 13:23:33 +00:00
parent 3ce8215a01
commit 15346b6950
3 changed files with 12 additions and 13 deletions

View File

@ -1,3 +1,11 @@
2007-10-31 Corinna Vinschen <corinna@vinschen.de>
* external.cc (get_cygdrive_info): Make inline.
(get_cygdrive_prefixes): Remove.
(cygwin_internal): Call get_cygdrive_info with NULL flag parameters
instead of get_cygdrive_prefixes.
* path.cc (mount_info::get_cygdrive_info): Allow NULL flag parameters.
2007-10-30 Corinna Vinschen <corinna@vinschen.de>
* fhandler_disk_file.cc (fhandler_base::fstat_helper): Don't remove

View File

@ -109,7 +109,7 @@ fillout_pinfo (pid_t pid, int winpid)
return &ep;
}
static DWORD
static inline DWORD
get_cygdrive_info (char *user, char *system, char *user_flags,
char *system_flags)
{
@ -118,15 +118,6 @@ get_cygdrive_info (char *user, char *system, char *user_flags,
return (res == ERROR_SUCCESS) ? 1 : 0;
}
static DWORD
get_cygdrive_prefixes (char *user, char *system)
{
char user_flags[CYG_MAX_PATH];
char system_flags[CYG_MAX_PATH];
DWORD res = get_cygdrive_info (user, system, user_flags, system_flags);
return res;
}
static DWORD
check_ntsec (const char *filename)
{
@ -211,7 +202,7 @@ cygwin_internal (cygwin_getinfo_types t, ...)
{
char *user = va_arg (arg, char *);
char *system = va_arg (arg, char *);
return get_cygdrive_prefixes (user, system);
return get_cygdrive_info (user, system, NULL, NULL);
}
case CW_GETPINFO_FULL:

View File

@ -2379,7 +2379,7 @@ mount_info::get_cygdrive_info (char *user, char *system, char* user_flags,
int res = r.get_string (CYGWIN_INFO_CYGDRIVE_PREFIX, user, CYG_MAX_PATH, "");
/* Get the user flags, if appropriate */
if (res == ERROR_SUCCESS)
if (user_flags && res == ERROR_SUCCESS)
{
int flags = r.get_int (CYGWIN_INFO_CYGDRIVE_FLAGS, MOUNT_CYGDRIVE | MOUNT_BINARY);
strcpy (user_flags, (flags & MOUNT_BINARY) ? "binmode" : "textmode");
@ -2390,7 +2390,7 @@ mount_info::get_cygdrive_info (char *user, char *system, char* user_flags,
int res2 = r2.get_string (CYGWIN_INFO_CYGDRIVE_PREFIX, system, CYG_MAX_PATH, "");
/* Get the system flags, if appropriate */
if (res2 == ERROR_SUCCESS)
if (system_flags && res2 == ERROR_SUCCESS)
{
int flags = r2.get_int (CYGWIN_INFO_CYGDRIVE_FLAGS, MOUNT_CYGDRIVE | MOUNT_BINARY);
strcpy (system_flags, (flags & MOUNT_BINARY) ? "binmode" : "textmode");