public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin/main] Cygwin: fhandler_base::fstat_by_name: improve debug output.
Date: Thu,  4 Apr 2024 16:24:22 +0000 (GMT)	[thread overview]
Message-ID: <20240404162422.39F99385840D@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=38b51398359076eed01d8f1b0f9c061d16a658f5

commit 38b51398359076eed01d8f1b0f9c061d16a658f5
Author:     Corinna Vinschen <corinna@vinschen.de>
AuthorDate: Thu Apr 4 18:20:28 2024 +0200
Commit:     Corinna Vinschen <corinna@vinschen.de>
CommitDate: Thu Apr 4 18:21:13 2024 +0200

    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>

Diff:
---
 winsup/cygwin/fhandler/disk_file.cc | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/winsup/cygwin/fhandler/disk_file.cc b/winsup/cygwin/fhandler/disk_file.cc
index 724ce7f7a587..f4c21d3b7f82 100644
--- a/winsup/cygwin/fhandler/disk_file.cc
+++ b/winsup/cygwin/fhandler/disk_file.cc
@@ -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;
 	}

                 reply	other threads:[~2024-04-04 16:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240404162422.39F99385840D@sourceware.org \
    --to=corinna@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).