From 87ab6c7b26bf3c925183d7e439985db070b03b39 Mon Sep 17 00:00:00 2001 From: Yoshinao Muramatsu Date: Mon, 20 Mar 2023 20:51:02 +0900 Subject: [PATCH] Cygwin: log disabling posix semantics Add log when workaround occurs Signed-off-by: Yoshinao Muramatsu --- 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 4843502c6..d5b44c378 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -737,7 +737,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 @@ -2670,6 +2674,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; }