mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-25 22:14:37 +00:00
Update debug messages for getcwd linux syscall
This commit is contained in:
parent
021d6fdd6b
commit
cac9449457
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user