From: James Pellow <james@alentdesignsolutions.com>
To: Paul Brook <paul@codesourcery.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Syscall 269
Date: Sun, 5 Dec 2004 17:16:25 -0800 [thread overview]
Message-ID: <200412051716.25918.james@alentdesignsolutions.com> (raw)
In-Reply-To: <200412041509.19222.paul@codesourcery.com>
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!
-James Pellow
-----------------------------------------------------------------------------------------------------------------
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 17:03:18.278887920 -0800
@@ -3025,6 +3025,14 @@
case TARGET_NR_get_thread_area:
goto unimplemented_nowarn;
#endif
+ case TARGET_NR_utimes:
+ {
+ struct target_timeval *target_tv = (void *)arg2;
+ struct timeval tv;
+ target_to_host_timeval(&tv, target_tv);
+ ret = get_errno(utimes((const char *)arg1, &tv));
+ break;
+ }
default:
unimplemented:
gemu_log("qemu: Unsupported syscall: %d\n", num);
-----------------------------------------------------------------------------------------------------------------
On Saturday 04 December 2004 07:09 am, Paul Brook wrote:
> On Saturday 04 December 2004 00:05, James Pellow wrote:
> > Hi Paul,
> >
> > Is this closer to what you want? I saw the swap functions. I wasn't
> > sure what long translated to for all supported archs. Do I need to do
> > 32/64 bit translation? tv_sec and tv_usec are both long.
>
> There is already code to properly handle struct timeval, you should use
> that. See the code for TARGET_NR_settimeofday.
>
> Paul
--
*****************************
James A. Pellow, President
Alent Design Solutions
www.alentdesignsolutions.com
(509) 526-0682
*****************************
next prev parent reply other threads:[~2004-12-06 1:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-18 9:38 [Qemu-devel] Syscall 269 James Pellow
2004-11-18 13:03 ` Paul Brook
2004-11-18 18:24 ` James Pellow
2004-12-04 0:05 ` James Pellow
2004-12-04 15:09 ` Paul Brook
2004-12-06 1:16 ` James Pellow [this message]
2004-12-06 1:26 ` Paul Brook
2004-12-06 2:58 ` James Pellow
2004-12-08 0:07 ` [Qemu-devel] Trivial (but useful) patch to save qemu pid to file Nile Geisinger
2004-12-08 18:12 ` Felipe Sanchez
2004-12-08 22:01 ` Fabrice Bellard
2004-12-09 2:11 ` Tim
2004-12-13 13:20 ` Nile Geisinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200412051716.25918.james@alentdesignsolutions.com \
--to=james@alentdesignsolutions.com \
--cc=paul@codesourcery.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).