4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-19 04:49:25 +08:00

Cygwin: fhandler_base::fstat_by_name: improve debug output.

Since we're opening the parent dir, it doesn't make sense
to print the name of the file in debug output.  Print parent
dirname instead.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2024-04-04 18:20:28 +02:00
parent 56e7563b9a
commit 38b5139835

View File

@ -328,8 +328,7 @@ fhandler_base::fstat_by_name (struct stat *buf)
| FILE_OPEN_FOR_BACKUP_INTENT
| FILE_DIRECTORY_FILE);
if (!NT_SUCCESS (status))
debug_printf ("%y = NtOpenFile(%S)", status,
pc.get_nt_native_path ());
debug_printf ("%y = NtOpenFile(%S)", status, &dirname);
else
{
status = NtQueryDirectoryFile (dir, NULL, NULL, NULL, &io,
@ -338,8 +337,7 @@ fhandler_base::fstat_by_name (struct stat *buf)
TRUE, &basename, TRUE);
NtClose (dir);
if (!NT_SUCCESS (status))
debug_printf ("%y = NtQueryDirectoryFile(%S)", status,
pc.get_nt_native_path ());
debug_printf ("%y = NtQueryDirectoryFile(%S)", status, &dirname);
else
ino = fdi_buf.fdi.FileId.QuadPart;
}