From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CUjRU-0001Od-Id for qemu-devel@nongnu.org; Thu, 18 Nov 2004 05:23:10 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CUjRR-0001Nn-9m for qemu-devel@nongnu.org; Thu, 18 Nov 2004 05:23:06 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CUixg-0008P2-US for qemu-devel@nongnu.org; Thu, 18 Nov 2004 04:52:21 -0500 Received: from [209.225.28.213] (helo=mxsf13.cluster1.charter.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CUioi-0007YA-OM for qemu-devel@nongnu.org; Thu, 18 Nov 2004 04:43:04 -0500 Received: from mxip06.cluster1.charter.net (mxip06a.cluster1.charter.net [209.225.28.136]) by mxsf13.cluster1.charter.net (8.12.11/8.12.11) with ESMTP id iAI9gsMb011467 for ; Thu, 18 Nov 2004 04:42:54 -0500 From: James Pellow Date: Thu, 18 Nov 2004 01:38:46 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200411180138.46857.james@alentdesignsolutions.com> Subject: [Qemu-devel] Syscall 269 Reply-To: james@alentdesignsolutions.com, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi All, I am trying to chroot to a gentoo flavor of arm linux on my AMD tbird-1.4GHz. I have set up binfmt_misc and qemu to allow me to do the chroot, and all seems to be working well. Now I wanted to emerge some stuff, and I get the following message: qemu: Unsupported syscall: 269. Looking at the arm linux kernel source, I see that 269 is utimes. Looking at the source code for qemu it seems that all I have to do is to add a define for TARGET_NR_utimes in all linux-user/*/syscall_nr.h and then add a new case in linux-user/syscall.c. So, I gave it a shot. The patch is at the bottom of this message. This is the first time I have looked at the qemu sources, so I am likely missing something, but the patch does seem to allow emerge to work properly under gentoo. If a correct implementation requires more work, I am happy to do that too, just let me know. BTW, I am not subscribed to this list to please CC me. Many thanks for a wonderful app. Cheers, -- ***************************** James A. Pellow, President Alent Design Solutions www.alentdesignsolutions.com (509) 526-0682 ***************************** diff -ruN qemu-0.6.1/linux-user/arm/syscall_nr.h qemu-0.6.1_new/linux-user/arm/syscall_nr.h --- qemu-0.6.1/linux-user/arm/syscall_nr.h 2004-11-14 12:51:33.000000000 -0800 +++ qemu-0.6.1_new/linux-user/arm/syscall_nr.h 2004-11-18 00:58:44.973757936 -0800 @@ -259,3 +259,5 @@ /* 254 for set_thread_area */ /* 255 for get_thread_area */ /* 256 for set_tid_address */ +#define TARGET_NR_utimes (269) + diff -ruN qemu-0.6.1/linux-user/i386/syscall_nr.h qemu-0.6.1_new/linux-user/i386/syscall_nr.h --- qemu-0.6.1/linux-user/i386/syscall_nr.h 2004-11-14 12:51:33.000000000 -0800 +++ qemu-0.6.1_new/linux-user/i386/syscall_nr.h 2004-11-18 01:28:59.324934632 -0800 @@ -271,3 +271,5 @@ #define TARGET_NR_clock_getres (TARGET_NR_timer_create+7) #define TARGET_NR_clock_nanosleep (TARGET_NR_timer_create+8) +#define TARGET_NR_utimes 271 + diff -ruN qemu-0.6.1/linux-user/syscall.c qemu-0.6.1_new/linux-user/syscall.c --- qemu-0.6.1/linux-user/syscall.c 2004-11-14 12:51:33.000000000 -0800 +++ qemu-0.6.1_new/linux-user/syscall.c 2004-11-18 01:15:54.561236848 -0800 @@ -3025,6 +3025,10 @@ case TARGET_NR_get_thread_area: goto unimplemented_nowarn; #endif + case TARGET_NR_utimes: + ret = get_errno(utimes((const char *)arg1, + (const struct timeval *)arg2)); + break; default: unimplemented: gemu_log("qemu: Unsupported syscall: %d\n", num);