From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Cb9I3-0006Nb-3F for qemu-devel@nongnu.org; Sun, 05 Dec 2004 22:11:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Cb9I2-0006NP-Lu for qemu-devel@nongnu.org; Sun, 05 Dec 2004 22:11:54 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Cb9I2-0006NM-Ir for qemu-devel@nongnu.org; Sun, 05 Dec 2004 22:11:54 -0500 Received: from [209.225.28.210] (helo=mxsf10.cluster1.charter.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Cb980-0001p1-NY for qemu-devel@nongnu.org; Sun, 05 Dec 2004 22:01:32 -0500 Received: from mxip03.cluster1.charter.net (mxip03a.cluster1.charter.net [209.225.28.133]) by mxsf10.cluster1.charter.net (8.12.11/8.12.11) with ESMTP id iB631V0I009204 for ; Sun, 5 Dec 2004 22:01:31 -0500 From: James Pellow Subject: Re: [Qemu-devel] Syscall 269 Date: Sun, 5 Dec 2004 18:58:30 -0800 References: <200411180138.46857.james@alentdesignsolutions.com> <200412051716.25918.james@alentdesignsolutions.com> <200412060126.29749.paul@codesourcery.com> In-Reply-To: <200412060126.29749.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200412051858.31073.james@alentdesignsolutions.com> 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: Paul Brook Cc: qemu-devel@nongnu.org Hi Paul, Ok, you got me that time. I guess I have been trying to hury my way through this to get it working. The man page I was looking at that defined utimes defines it as: int utimes(char *filename, struct timeval *tvp); If you go looking further in the page, a discussion is found about *tvp actually being a two member array. I hadn't looked down that far I guess. (a bit red in the face...) So, this should be it: -------------------------------------------------------------------------------------------------------- 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.000000000 -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.000000000 -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-12-05 18:49:23.208271576 -0800 @@ -3025,6 +3025,15 @@ case TARGET_NR_get_thread_area: goto unimplemented_nowarn; #endif + case TARGET_NR_utimes: + { + struct target_timeval *target_tv = (void *)arg2; + struct timeval tv[2]; + target_to_host_timeval(&tv[0], &target_tv[0]); + target_to_host_timeval(&tv[1], &target_tv[1]); + ret = get_errno(utimes((const char *)arg1, tv)); + break; + } default: unimplemented: gemu_log("qemu: Unsupported syscall: %d\n", num); --------------------------------------------------------------------------------------------------------------------------- Thanks for your help. -James Pellow On Sunday 05 December 2004 05:26 pm, Paul Brook wrote: > On Monday 06 December 2004 01:16, James Pellow wrote: > > Hi Paul, > > > > Ok, third time is the charm right... It looks like the functions you > > referred to that handle struct timeval, are doing exactly what I had > > done. Here is an updated patch that factors out the swap code using the > > existing function. Hopefully this is ready for inclusion. Thanks for > > your help with this and for a truely incredible project! > > Still not quite there. utimes takes [a pointer to] an array of two struct > timeval. You only thunk the first one. > > Paul -- ***************************** James A. Pellow, President Alent Design Solutions www.alentdesignsolutions.com (509) 526-0682 *****************************