Skip to content

Commit

Permalink
Cygwin: fhandler_base::fstat_by_name: improve debug output.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
github-cygwin committed Apr 4, 2024
1 parent 56e7563 commit 38b5139
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions winsup/cygwin/fhandler/disk_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
}
Expand Down

0 comments on commit 38b5139

Please sign in to comment.