* fhandler.h (fhandler_base::pc): Make public.

* fhandler_disk_file.cc (fhandler_disk_file::link): Drop extern
	declaration of stat_suffixes.  Use NT native path in debug output.
	(fhandler_base::utimes_fs): Simplify closeit case.  Use close_fs
	to close newly opened file handle.
	(fhandler_base::open_fs): Use NT native path in debug output.
	* path.cc: Throughout drop extern declaration of stat_suffixes.
	* path.h (stat_suffixes): Declare.
	* sec_acl.cc (acl_worker): Drop extern declaration of stat_suffixes.
	* times.cc (utimes_worker): Take path_conv as parameter instead of
	single-byte pathnam, drop nofollow argument, accommodate throughout.
	Compare UNICODE paths when enumerating file descriptors.  Fix
	formatting.  Use NT native path in debug output.
This commit is contained in:
Corinna Vinschen
2007-08-14 14:48:52 +00:00
parent 7d2ade3341
commit 4a971ce403
7 changed files with 39 additions and 25 deletions

View File

@ -1050,7 +1050,6 @@ int
fhandler_disk_file::link (const char *newpath)
{
extern bool allow_winsymlinks;
extern suffix_info stat_suffixes[];
path_conv newpc (newpath, PC_SYM_NOFOLLOW | PC_POSIX,
transparent_exe ? stat_suffixes : NULL);
@ -1062,7 +1061,7 @@ fhandler_disk_file::link (const char *newpath)
if (newpc.exists ())
{
syscall_printf ("file '%s' exists?", newpc.get_win32 ());
syscall_printf ("file '%S' exists?", newpc.get_nt_native_path ());
set_errno (EEXIST);
return -1;
}
@ -1195,17 +1194,15 @@ fhandler_base::utimes_fs (const struct timeval *tvp)
fbi.FileAttributes = 0;
NTSTATUS status = NtSetInformationFile (get_handle (), &io, &fbi, sizeof fbi,
FileBasicInformation);
if (closeit)
close_fs ();
/* Opening a directory on a 9x share from a NT machine works(!), but
then NtSetInformationFile fails with STATUS_NOT_SUPPORTED. Oh well... */
if (!NT_SUCCESS (status) && status != STATUS_NOT_SUPPORTED)
{
if (closeit)
close ();
__seterrno_from_nt_status (status);
return -1;
}
if (closeit)
close ();
return 0;
}
@ -1265,8 +1262,8 @@ fhandler_base::open_fs (int flags, mode_t mode)
set_fs_flags (pc.fs_flags ());
out:
syscall_printf ("%d = fhandler_disk_file::open (%s, %p)", res,
get_win32_name (), flags);
syscall_printf ("%d = fhandler_disk_file::open (%S, %p)", res,
pc.get_nt_native_path (), flags);
return res;
}