From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 39F99385840D; Thu, 4 Apr 2024 16:24:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 39F99385840D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1712247862; bh=J2W7xf8HRxZ4ocU8+IuaWsUI4QGOajFTqp+w2cavWOA=; h=From:To:Subject:Date:From; b=W/W5i38+c4nFc2JGz4rDd6s3W0aiTwUji9uNDPOONmUs3fEyMqxpeb65SBYkSoQZd J7jfH8GttdqfCO9hqNKRCFNk+rmmZIVtr0+v/X/JeYFgJgXalcvlfGpJzmwsSeqFR+ ZSsqYS/XI4HEEqFpsrYibIwkrF02d4sPG80nKe9w= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/main] Cygwin: fhandler_base::fstat_by_name: improve debug output. X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/main X-Git-Oldrev: 56e7563b9aa665f35b657537e46a7feb4726f763 X-Git-Newrev: 38b51398359076eed01d8f1b0f9c061d16a658f5 Message-Id: <20240404162422.39F99385840D@sourceware.org> Date: Thu, 4 Apr 2024 16:24:22 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D38b51398359= 076eed01d8f1b0f9c061d16a658f5 commit 38b51398359076eed01d8f1b0f9c061d16a658f5 Author: Corinna Vinschen AuthorDate: Thu Apr 4 18:20:28 2024 +0200 Commit: Corinna Vinschen CommitDate: Thu Apr 4 18:21:13 2024 +0200 Cygwin: fhandler_base::fstat_by_name: improve debug output. =20 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. =20 Signed-off-by: Corinna Vinschen 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/d= isk_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 =3D NtOpenFile(%S)", status, - pc.get_nt_native_path ()); + debug_printf ("%y =3D NtOpenFile(%S)", status, &dirname); else { status =3D 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 =3D NtQueryDirectoryFile(%S)", status, - pc.get_nt_native_path ()); + debug_printf ("%y =3D NtQueryDirectoryFile(%S)", status, &dirname); else ino =3D fdi_buf.fdi.FileId.QuadPart; }