From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CbErx-00025R-Hk for qemu-devel@nongnu.org; Mon, 06 Dec 2004 04:09:21 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CbEru-00023R-Fe for qemu-devel@nongnu.org; Mon, 06 Dec 2004 04:09:19 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CbErt-00022y-N1 for qemu-devel@nongnu.org; Mon, 06 Dec 2004 04:09:17 -0500 Received: from [209.225.28.156] (helo=mxsf32.cluster1.charter.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CbEhk-00013M-AJ for qemu-devel@nongnu.org; Mon, 06 Dec 2004 03:58:48 -0500 Received: from mxip06.cluster1.charter.net (mxip06a.cluster1.charter.net [209.225.28.136]) by mxsf32.cluster1.charter.net (8.12.11/8.12.11) with ESMTP id iB68wlii027288 for ; Mon, 6 Dec 2004 03:58:47 -0500 From: James Pellow Date: Mon, 6 Dec 2004 00:55:49 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200412060055.49609.james@alentdesignsolutions.com> Subject: [Qemu-devel] ARM syscall 186. 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, In the quest for a running gentoo, I found the need for ARM syscall 186. This is required to get ncurses to install. This seems to work for me, though I have only tested it in the context of an ncurses install. Let me know if something isn't right and I will fix it. I spent a bit more time looking at the proper way to handle things this time, so I am pretty sure this is actually correct :) Thanks for any feedback. Here is the patch: ------------------------------------------------------------------------------------------------------------ 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-06 00:05:26.139467848 -0800 @@ -2700,7 +2700,23 @@ case TARGET_NR_capset: goto unimplemented; case TARGET_NR_sigaltstack: - goto unimplemented; + { + struct target_stack_t *ss_target = (void *)arg1; + struct target_stack_t *oss_target = (void *)arg2; + stack_t ss, oss; + + ss.ss_sp = (void *)tswapl(ss_target->ss_sp); + ss.ss_flags = tswap32(ss_target->ss_flags); + ss.ss_size = tswapl(ss_target->ss_size); + + ret = get_errno(sigaltstack(&ss, &oss)); + if (!is_error(ret) && oss_target != NULL) { + oss_target->ss_sp = tswapl((long)oss.ss_sp); + oss_target->ss_flags = tswap32(oss.ss_flags); + oss_target->ss_size = tswapl(oss.ss_size); + } + } + break; case TARGET_NR_sendfile: goto unimplemented; #ifdef TARGET_NR_getpmsg diff -ruN qemu-0.6.1/linux-user/syscall_defs.h qemu-0.6.1_new/linux-user/syscall_defs.h --- qemu-0.6.1/linux-user/syscall_defs.h 2004-11-14 12:51:33.000000000 -0800 +++ qemu-0.6.1_new/linux-user/syscall_defs.h 2004-12-05 22:40:00.249721536 -0800 @@ -97,6 +97,12 @@ #define TARGET_IOWU(type,nr) TARGET_IOC(TARGET_IOC_WRITE,(type), (nr),TARGET_IOC_SIZEMASK) #define TARGET_IOWRU(type,nr) TARGET_IOC(TARGET_IOC_READ|TARGET_IOC_WRITE, (type),(nr),TARGET_IOC_SIZEMASK) +struct target_stack_t { + target_long ss_sp; + int ss_flags; + target_long ss_size; +}; + struct target_sockaddr { uint16_t sa_family; uint8_t sa_data[14]; --------------------------------------------------------------------------------------------------------------- Cheers, -- ***************************** James A. Pellow, President Alent Design Solutions www.alentdesignsolutions.com (509) 526-0682 *****************************