From cac944945780f9872c97da948e0e9f6cff07c7a4 Mon Sep 17 00:00:00 2001 From: EnderIce2 Date: Sat, 31 Aug 2024 22:15:24 +0300 Subject: [PATCH] Update debug messages for getcwd linux syscall --- syscalls/linux.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/syscalls/linux.cpp b/syscalls/linux.cpp index efcad2e3..e1f3533c 100644 --- a/syscalls/linux.cpp +++ b/syscalls/linux.cpp @@ -1886,12 +1886,13 @@ static long linux_getcwd(SysFrm *, char *buf, size_t size) size_t len = strlen(cwd); if (len >= size) { - warn("Buffer too small"); + warn("Buffer too small (%ld < %ld)", len, size); return -ERANGE; } strncpy(pBuf, cwd, len); pBuf[len] = '\0'; + debug("cwd: \"%s\" with %ld bytes", cwd, len); return len; }