From owner-svn-src-stable-8@FreeBSD.ORG Wed Apr 7 14:35:10 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CA41106566B; Wed, 7 Apr 2010 14:35:10 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B4EF8FC1F; Wed, 7 Apr 2010 14:35:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37EZAnQ023098; Wed, 7 Apr 2010 14:35:10 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37EZATu023094; Wed, 7 Apr 2010 14:35:10 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004071435.o37EZATu023094@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Apr 2010 14:35:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206348 - in stable/8/sys: compat/freebsd32 kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 14:35:10 -0000 Author: kib Date: Wed Apr 7 14:35:09 2010 New Revision: 206348 URL: http://svn.freebsd.org/changeset/base/206348 Log: MFC r205322: Move SysV IPC freebsd32 compat shims helpers from freebsd32_misc.c to sysv_ipc.c. Modified: stable/8/sys/compat/freebsd32/freebsd32_ipc.h stable/8/sys/compat/freebsd32/freebsd32_misc.c stable/8/sys/kern/sysv_ipc.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/compat/freebsd32/freebsd32_ipc.h ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_ipc.h Wed Apr 7 14:28:47 2010 (r206347) +++ stable/8/sys/compat/freebsd32/freebsd32_ipc.h Wed Apr 7 14:35:09 2010 (r206348) @@ -147,6 +147,14 @@ struct shmid_ds32_old { int32_t shm_ctime; uint32_t shm_internal; }; + +void freebsd32_ipcperm_old_in(struct ipc_perm32_old *ip32, + struct ipc_perm *ip); +void freebsd32_ipcperm_old_out(struct ipc_perm *ip, + struct ipc_perm32_old *ip32); #endif +void freebsd32_ipcperm_in(struct ipc_perm32 *ip32, struct ipc_perm *ip); +void freebsd32_ipcperm_out(struct ipc_perm *ip, struct ipc_perm32 *ip32); + #endif /* !_COMPAT_FREEBSD32_FREEBSD32_IPC_H_ */ Modified: stable/8/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_misc.c Wed Apr 7 14:28:47 2010 (r206347) +++ stable/8/sys/compat/freebsd32/freebsd32_misc.c Wed Apr 7 14:35:09 2010 (r206348) @@ -1400,60 +1400,6 @@ freebsd4_freebsd32_fhstatfs(struct threa } #endif -#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ - defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) -static void -freebsd32_ipcperm_old_in(struct ipc_perm32_old *ip32, struct ipc_perm *ip) -{ - - CP(*ip32, *ip, cuid); - CP(*ip32, *ip, cgid); - CP(*ip32, *ip, uid); - CP(*ip32, *ip, gid); - CP(*ip32, *ip, mode); - CP(*ip32, *ip, seq); - CP(*ip32, *ip, key); -} - -static void -freebsd32_ipcperm_old_out(struct ipc_perm *ip, struct ipc_perm32_old *ip32) -{ - - CP(*ip, *ip32, cuid); - CP(*ip, *ip32, cgid); - CP(*ip, *ip32, uid); - CP(*ip, *ip32, gid); - CP(*ip, *ip32, mode); - CP(*ip, *ip32, seq); - CP(*ip, *ip32, key); -} -#endif - -static void -freebsd32_ipcperm_in(struct ipc_perm32 *ip32, struct ipc_perm *ip) -{ - - CP(*ip32, *ip, cuid); - CP(*ip32, *ip, cgid); - CP(*ip32, *ip, uid); - CP(*ip32, *ip, gid); - CP(*ip32, *ip, mode); - CP(*ip32, *ip, seq); - CP(*ip32, *ip, key); -} - -static void -freebsd32_ipcperm_out(struct ipc_perm *ip, struct ipc_perm32 *ip32) -{ - - CP(*ip, *ip32, cuid); - CP(*ip, *ip32, cgid); - CP(*ip, *ip32, uid); - CP(*ip, *ip32, gid); - CP(*ip, *ip32, mode); - CP(*ip, *ip32, seq); - CP(*ip, *ip32, key); -} int freebsd32_semsys(struct thread *td, struct freebsd32_semsys_args *uap) Modified: stable/8/sys/kern/sysv_ipc.c ============================================================================== --- stable/8/sys/kern/sysv_ipc.c Wed Apr 7 14:28:47 2010 (r206347) +++ stable/8/sys/kern/sysv_ipc.c Wed Apr 7 14:35:09 2010 (r206348) @@ -178,3 +178,69 @@ ipcperm_new2old(struct ipc_perm *new, st old->key = new->key; } #endif + +#ifdef COMPAT_FREEBSD32 +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ + defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) +void +freebsd32_ipcperm_old_in(struct ipc_perm32_old *ip32, struct ipc_perm *ip) +{ + + CP(*ip32, *ip, cuid); + CP(*ip32, *ip, cgid); + CP(*ip32, *ip, uid); + CP(*ip32, *ip, gid); + CP(*ip32, *ip, mode); + CP(*ip32, *ip, seq); + CP(*ip32, *ip, key); +} + +void +freebsd32_ipcperm_old_out(struct ipc_perm *ip, struct ipc_perm32_old *ip32) +{ + + CP(*ip, *ip32, cuid); + CP(*ip, *ip32, cgid); + CP(*ip, *ip32, uid); + CP(*ip, *ip32, gid); + CP(*ip, *ip32, mode); + CP(*ip, *ip32, seq); + CP(*ip, *ip32, key); +} +#endif + +void +freebsd32_ipcperm_in(struct ipc_perm32 *ip32, struct ipc_perm *ip) +{ + + CP(*ip32, *ip, cuid); + CP(*ip32, *ip, cgid); + CP(*ip32, *ip, uid); + CP(*ip32, *ip, gid); + CP(*ip32, *ip, mode); + CP(*ip32, *ip, seq); + CP(*ip32, *ip, key); +} + +void +freebsd32_ipcperm_out(struct ipc_perm *ip, struct ipc_perm32 *ip32) +{ + + CP(*ip, *ip32, cuid); + CP(*ip, *ip32, cgid); + CP(*ip, *ip32, uid); + CP(*ip, *ip32, gid); + CP(*ip, *ip32, mode); + CP(*ip, *ip32, seq); + CP(*ip, *ip32, key); +} +#endif