From owner-svn-src-all@FreeBSD.ORG Sun Feb 7 17:05:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25DCA106566C; Sun, 7 Feb 2010 17:05:23 +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 F19A08FC0C; Sun, 7 Feb 2010 17:05:22 +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 o17H5MxH080580; Sun, 7 Feb 2010 17:05:22 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o17H5Mdt080576; Sun, 7 Feb 2010 17:05:22 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201002071705.o17H5Mdt080576@svn.freebsd.org> From: Warner Losh Date: Sun, 7 Feb 2010 17:05:22 +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: r203613 - head/bin/pax 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: Sun, 07 Feb 2010 17:05:23 -0000 Author: imp Date: Sun Feb 7 17:05:22 2010 New Revision: 203613 URL: http://svn.freebsd.org/changeset/base/203613 Log: Tell the compiler these structures are aligned to a byte boundary. All the elements of these structs are char anyway, so it won't hurt performance. Bump warns back up to the default. # we likely should have CTASSERTS to make sure they are the right size. # but with libarchive based tar maybe we shouldn't bother. Modified: head/bin/pax/Makefile head/bin/pax/cpio.h head/bin/pax/tar.h Modified: head/bin/pax/Makefile ============================================================================== --- head/bin/pax/Makefile Sun Feb 7 16:55:45 2010 (r203612) +++ head/bin/pax/Makefile Sun Feb 7 17:05:22 2010 (r203613) @@ -33,6 +33,4 @@ SRCS= ar_io.c ar_subs.c buf_subs.c cache #MAN= pax.1 tar.1 cpio.1 #LINKS= ${BINDIR}/pax ${BINDIR}/tar ${BINDIR}/pax ${BINDIR}/cpio -WARNS?= 3 - .include Modified: head/bin/pax/cpio.h ============================================================================== --- head/bin/pax/cpio.h Sun Feb 7 16:55:45 2010 (r203612) +++ head/bin/pax/cpio.h Sun Feb 7 17:05:22 2010 (r203613) @@ -67,7 +67,7 @@ typedef struct { char c_mtime[11]; /* modification time */ char c_namesize[6]; /* length of pathname */ char c_filesize[11]; /* length of file in bytes */ -} HD_CPIO; +} HD_CPIO __aligned(1); #define MAGIC 070707 /* transportable archive id */ @@ -98,7 +98,7 @@ typedef struct { u_char h_namesize[2]; u_char h_filesize_1[2]; u_char h_filesize_2[2]; -} HD_BCPIO; +} HD_BCPIO __aligned(1); #ifdef _PAX_ /* @@ -136,7 +136,7 @@ typedef struct { char c_rmin[8]; /* special file minor # */ char c_namesize[8]; /* length of pathname */ char c_chksum[8]; /* 0 OR CRC of bytes of FILE data */ -} HD_VCPIO; +} HD_VCPIO __aligned(1); #define VMAGIC 070701 /* sVr4 new portable archive id */ #define VCMAGIC 070702 /* sVr4 new portable archive id CRC */ Modified: head/bin/pax/tar.h ============================================================================== --- head/bin/pax/tar.h Sun Feb 7 16:55:45 2010 (r203612) +++ head/bin/pax/tar.h Sun Feb 7 17:05:22 2010 (r203613) @@ -96,7 +96,7 @@ typedef struct { char chksum[CHK_LEN]; /* checksum */ char linkflag; /* norm, hard, or sym. */ char linkname[TNMSZ]; /* linked to name */ -} HD_TAR; +} HD_TAR __aligned(1); #ifdef _PAX_ /* @@ -142,4 +142,4 @@ typedef struct { char devmajor[8]; /* major device number */ char devminor[8]; /* minor device number */ char prefix[TPFSZ]; /* linked to name */ -} HD_USTAR; +} HD_USTAR __aligned(1);