[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cygwin-patches
Subject:    [PATCH 3/3] log disabling posix semantics
From:       Yoshinao Muramatsu <ysno () ac ! auone-net ! jp>
Date:       2023-03-20 11:51:02
Message-ID: 20230320115102.1692-4-ysno () ac ! auone-net ! jp
[Download RAW message or body]

Add log when workaround occurs

Signed-off-by: Yoshinao Muramatsu <ysno@ac.auone-net.jp>
---
 winsup/cygwin/syscalls.cc | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 57bfab9d3..bc93c16d8 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -735,7 +735,11 @@ _unlink_nt (path_conv &pc, bool shareable)
          on a bind mounted fs in hyper-v container. Falling back too. */
       if (status != STATUS_CANNOT_DELETE
           && status != STATUS_INVALID_PARAMETER)
-	goto out;
+        {
+          debug_printf ("NtSetInformationFile returns %y "
+                        "with posix semantics. Disable it and retry.", status);
+          goto out;
+        }
     }
 
   /* If the R/O attribute is set, we have to open the file with
@@ -2678,6 +2682,8 @@ skip_pre_W10_checks:
              on a bind mounted file system in hyper-v container
              with FILE_RENAME_POSIX_SEMANTICS.
              Disable the use_posix semntics flag and retry. */
+          debug_printf ("NtSetInformationFile failed with posix semantics. "
+                        "Disable it and retry.");
           use_posix_semantics = 0;
           goto ignore_posix_semantics_retry;
         }
-- 
2.37.3.windows.1

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic