qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Syscall 269
@ 2004-11-18  9:38 James Pellow
  2004-11-18 13:03 ` Paul Brook
  0 siblings, 1 reply; 13+ messages in thread
From: James Pellow @ 2004-11-18  9:38 UTC (permalink / raw)
  To: qemu-devel

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);

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2004-12-13 22:01 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).