Date: Sat, 11 Nov 2006 01:14:04 GMT From: Jung-uk Kim <jkim@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 109714 for review Message-ID: <200611110114.kAB1E4fY083648@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611110114.kAB1E4fY083648>