From owner-svn-src-stable@FreeBSD.ORG Tue Feb 7 21:56:59 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C61A71065670; Tue, 7 Feb 2012 21:56:59 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 99A1D8FC12; Tue, 7 Feb 2012 21:56:59 +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 q17LuxuX009065; Tue, 7 Feb 2012 21:56:59 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q17Luxj2009063; Tue, 7 Feb 2012 21:56:59 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201202072156.q17Luxj2009063@svn.freebsd.org> From: Xin LI Date: Tue, 7 Feb 2012 21:56:59 +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: r231162 - in stable: 8/sbin/newfs_msdos 9/sbin/newfs_msdos X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Feb 2012 21:56:59 -0000 Author: delphij Date: Tue Feb 7 21:56:58 2012 New Revision: 231162 URL: http://svn.freebsd.org/changeset/base/231162 Log: MFC r227454: Use __packed to prevent alignment from taking place, which otherwise may change the on-disk format in an incompatible way. Without this change, msdosfs created on FreeBSD/arm would not be mountable. PR: bin/162486 Submitted by: Ian Lepore Reported by: Mattia Rossi Modified: stable/8/sbin/newfs_msdos/newfs_msdos.c Directory Properties: stable/8/sbin/newfs_msdos/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sbin/newfs_msdos/newfs_msdos.c Directory Properties: stable/9/sbin/newfs_msdos/ (props changed) Modified: stable/8/sbin/newfs_msdos/newfs_msdos.c ============================================================================== --- stable/8/sbin/newfs_msdos/newfs_msdos.c Tue Feb 7 20:54:44 2012 (r231161) +++ stable/8/sbin/newfs_msdos/newfs_msdos.c Tue Feb 7 21:56:58 2012 (r231162) @@ -99,7 +99,7 @@ static const char rcsid[] = struct bs { u_int8_t bsJump[3]; /* bootstrap entry point */ u_int8_t bsOemName[8]; /* OEM name and version */ -}; +} __packed; struct bsbpb { u_int8_t bpbBytesPerSec[2]; /* bytes per sector */ @@ -114,7 +114,7 @@ struct bsbpb { u_int8_t bpbHeads[2]; /* drive heads */ u_int8_t bpbHiddenSecs[4]; /* hidden sectors */ u_int8_t bpbHugeSectors[4]; /* big total sectors */ -}; +} __packed; struct bsxbpb { u_int8_t bpbBigFATsecs[4]; /* big sectors per FAT */ @@ -124,7 +124,7 @@ struct bsxbpb { u_int8_t bpbFSInfo[2]; /* file system info sector */ u_int8_t bpbBackup[2]; /* backup boot sector */ u_int8_t bpbReserved[12]; /* reserved */ -}; +} __packed; struct bsx { u_int8_t exDriveNumber; /* drive number */ @@ -133,7 +133,7 @@ struct bsx { u_int8_t exVolumeID[4]; /* volume ID number */ u_int8_t exVolumeLabel[11]; /* volume label */ u_int8_t exFileSysType[8]; /* file system type */ -}; +} __packed; struct de { u_int8_t deName[11]; /* name and extension */ @@ -143,7 +143,7 @@ struct de { u_int8_t deMDate[2]; /* creation date */ u_int8_t deStartCluster[2]; /* starting cluster */ u_int8_t deFileSize[4]; /* size */ -}; +} __packed; struct bpb { u_int bpbBytesPerSec; /* bytes per sector */