[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [7130] linux-user: fix getcwd syscall
From: |
Aurelien Jarno |
Subject: |
[Qemu-devel] [7130] linux-user: fix getcwd syscall |
Date: |
Thu, 16 Apr 2009 14:17:15 +0000 |
Revision: 7130
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7130
Author: aurel32
Date: 2009-04-16 14:17:14 +0000 (Thu, 16 Apr 2009)
Log Message:
-----------
linux-user: fix getcwd syscall
The patch called "prefer glibc over direct syscalls" (commit 7118) has
replaced the getcwd syscall with a call to the glibc. With this change,
the syscall is returning -1 in error case and 0 otherwise.
This is problematic as the sys_getcwd syscall should return the number
of bytes written to the buffer including the '\0'.
Signed-off-by: Arnaud Patard <address@hidden>
Acked-By: Riku Voipio <address@hidden>
Signed-off-by: Aurelien Jarno <address@hidden>
Modified Paths:
--------------
trunk/linux-user/syscall.c
Modified: trunk/linux-user/syscall.c
===================================================================
--- trunk/linux-user/syscall.c 2009-04-16 12:57:58 UTC (rev 7129)
+++ trunk/linux-user/syscall.c 2009-04-16 14:17:14 UTC (rev 7130)
@@ -293,7 +293,7 @@
/* getcwd() sets errno */
return (-1);
}
- return (0);
+ return strlen(buf)+1;
}
#ifdef CONFIG_ATFILE
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [7130] linux-user: fix getcwd syscall,
Aurelien Jarno <=