From owner-p4-projects@FreeBSD.ORG Sat Nov 11 01:14:05 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0B2B716A416; Sat, 11 Nov 2006 01:14:05 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BBAF516A412 for ; Sat, 11 Nov 2006 01:14:04 +0000 (UTC) (envelope-from jkim@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 91F2843D45 for ; Sat, 11 Nov 2006 01:14:04 +0000 (GMT) (envelope-from jkim@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAB1E4EO083651 for ; Sat, 11 Nov 2006 01:14:04 GMT (envelope-from jkim@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAB1E4fY083648 for perforce@freebsd.org; Sat, 11 Nov 2006 01:14:04 GMT (envelope-from jkim@freebsd.org) Date: Sat, 11 Nov 2006 01:14:04 GMT Message-Id: <200611110114.kAB1E4fY083648@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jkim@freebsd.org using -f From: Jung-uk Kim To: Perforce Change Reviews Cc: Subject: PERFORCE change 109714 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Nov 2006 01:14:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=109714 Change 109714 by jkim@jkim_hammer on 2006/11/11 01:13:58 Add SYSCALL_MODULE_PRESENT macro. Affected files ... .. //depot/projects/linuxolator/src/sys/compat/freebsd32/freebsd32_misc.c#5 edit .. //depot/projects/linuxolator/src/sys/sys/sysent.h#2 edit Differences ... ==== //depot/projects/linuxolator/src/sys/compat/freebsd32/freebsd32_misc.c#5 (text+ko) ==== @@ -1362,8 +1362,7 @@ { struct msgsnd_args ap; - if (sysent[SYS_msgsnd].sy_call == (sy_call_t *)lkmnosys || - sysent[SYS_msgsnd].sy_call == (sy_call_t *)lkmressys) + if (!SYSCALL_MODULE_PRESENT(msgsnd)) return (nosys(td, (struct nosys_args *)uap)); ap.msqid = uap->msqid; @@ -1379,8 +1378,7 @@ { struct msgrcv_args ap; - if (sysent[SYS_msgrcv].sy_call == (sy_call_t *)lkmnosys || - sysent[SYS_msgrcv].sy_call == (sy_call_t *)lkmressys) + if (!SYSCALL_MODULE_PRESENT(msgrcv)) return (nosys(td, (struct nosys_args *)uap)); ap.msqid = uap->msqid; ==== //depot/projects/linuxolator/src/sys/sys/sysent.h#2 (text+ko) ==== @@ -143,6 +143,12 @@ & syscallname##_syscall, & syscallname##_sysent, \ NULL, NULL); +#define SYSCALL_MODULE_PRESENT(syscallname) \ + (sysent[SYS_##syscallname].sy_call != \ + (sy_call_t *)lkmnosys && \ + sysent[SYS_##syscallname].sy_call != \ + (sy_call_t *)lkmressys) + int syscall_register(int *offset, struct sysent *new_sysent, struct sysent *old_sysent); int syscall_deregister(int *offset, struct sysent *old_sysent);