From owner-svn-src-all@FreeBSD.ORG Thu Jun 28 07:33:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 14D18106564A; Thu, 28 Jun 2012 07:33:44 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA6B28FC0C; Thu, 28 Jun 2012 07:33:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q5S7XhY8059932; Thu, 28 Jun 2012 07:33:43 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5S7XhOK059928; Thu, 28 Jun 2012 07:33:43 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201206280733.q5S7XhOK059928@svn.freebsd.org> From: Warner Losh Date: Thu, 28 Jun 2012 07:33:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237694 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2012 07:33:44 -0000 Author: imp Date: Thu Jun 28 07:33:43 2012 New Revision: 237694 URL: http://svn.freebsd.org/changeset/base/237694 Log: Remove an old hack I noticed years ago, but never committed. Modified: head/sys/kern/imgact_aout.c head/sys/kern/imgact_gzip.c head/sys/sys/imgact_aout.h Modified: head/sys/kern/imgact_aout.c ============================================================================== --- head/sys/kern/imgact_aout.c Thu Jun 28 07:28:39 2012 (r237693) +++ head/sys/kern/imgact_aout.c Thu Jun 28 07:33:43 2012 (r237694) @@ -174,9 +174,9 @@ exec_aout_imgact(struct image_params *im * 0x64 for Linux, 0x86 for *BSD, 0x00 for BSDI. * NetBSD is in network byte order.. ugh. */ - if (((a_out->a_magic >> 16) & 0xff) != 0x86 && - ((a_out->a_magic >> 16) & 0xff) != 0 && - ((((int)ntohl(a_out->a_magic)) >> 16) & 0xff) != 0x86) + if (((a_out->a_midmag >> 16) & 0xff) != 0x86 && + ((a_out->a_midmag >> 16) & 0xff) != 0 && + ((((int)ntohl(a_out->a_midmag)) >> 16) & 0xff) != 0x86) return -1; /* @@ -184,7 +184,7 @@ exec_aout_imgact(struct image_params *im * We do two cases: host byte order and network byte order * (for NetBSD compatibility) */ - switch ((int)(a_out->a_magic & 0xffff)) { + switch ((int)(a_out->a_midmag & 0xffff)) { case ZMAGIC: virtual_offset = 0; if (a_out->a_text) { @@ -203,7 +203,7 @@ exec_aout_imgact(struct image_params *im break; default: /* NetBSD compatibility */ - switch ((int)(ntohl(a_out->a_magic) & 0xffff)) { + switch ((int)(ntohl(a_out->a_midmag) & 0xffff)) { case ZMAGIC: case QMAGIC: virtual_offset = PAGE_SIZE; Modified: head/sys/kern/imgact_gzip.c ============================================================================== --- head/sys/kern/imgact_gzip.c Thu Jun 28 07:28:39 2012 (r237693) +++ head/sys/kern/imgact_gzip.c Thu Jun 28 07:33:43 2012 (r237694) @@ -161,7 +161,7 @@ do_aout_hdr(struct imgact_gzip * gz) * Set file/virtual offset based on a.out variant. We do two cases: * host byte order and network byte order (for NetBSD compatibility) */ - switch ((int) (gz->a_out.a_magic & 0xffff)) { + switch ((int) (gz->a_out.a_midmag & 0xffff)) { case ZMAGIC: gz->virtual_offset = 0; if (gz->a_out.a_text) { @@ -177,7 +177,7 @@ do_aout_hdr(struct imgact_gzip * gz) break; default: /* NetBSD compatibility */ - switch ((int) (ntohl(gz->a_out.a_magic) & 0xffff)) { + switch ((int) (ntohl(gz->a_out.a_midmag) & 0xffff)) { case ZMAGIC: case QMAGIC: gz->virtual_offset = PAGE_SIZE; Modified: head/sys/sys/imgact_aout.h ============================================================================== --- head/sys/sys/imgact_aout.h Thu Jun 28 07:28:39 2012 (r237693) +++ head/sys/sys/imgact_aout.h Thu Jun 28 07:33:43 2012 (r237694) @@ -119,7 +119,6 @@ struct exec { uint32_t a_trsize; /* text relocation size */ uint32_t a_drsize; /* data relocation size */ }; -#define a_magic a_midmag /* XXX Hack to work with imgact_{aout,gzip}.c */ /* a_magic */ #define OMAGIC 0407 /* old impure format */