From owner-svn-src-head@FreeBSD.ORG Sun May 5 08:00:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4DF7A1B4; Sun, 5 May 2013 08:00:17 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4162435D; Sun, 5 May 2013 08:00:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4580HBk076304; Sun, 5 May 2013 08:00:17 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4580HrN076303; Sun, 5 May 2013 08:00:17 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <201305050800.r4580HrN076303@svn.freebsd.org> From: Stanislav Sedov Date: Sun, 5 May 2013 08:00:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250264 - head/sys/geom/label X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 May 2013 08:00:17 -0000 Author: stas Date: Sun May 5 08:00:16 2013 New Revision: 250264 URL: http://svnweb.freebsd.org/changeset/base/250264 Log: - Use int8_t type for the mftrecsz field in g_label_ntfs. char type used previously caused probe failure on platforms where char is unsigned (e.g. ARM), as mftrecsz can be negative. Submitted by: Ilya Bakulin MFC after: 2 weeks Modified: head/sys/geom/label/g_label_ntfs.c Modified: head/sys/geom/label/g_label_ntfs.c ============================================================================== --- head/sys/geom/label/g_label_ntfs.c Sun May 5 06:32:13 2013 (r250263) +++ head/sys/geom/label/g_label_ntfs.c Sun May 5 08:00:16 2013 (r250264) @@ -86,7 +86,7 @@ struct ntfs_bootfile { uint64_t bf_spv; uint64_t bf_mftcn; uint64_t bf_mftmirrcn; - uint8_t bf_mftrecsz; + int8_t bf_mftrecsz; uint32_t bf_ibsz; uint32_t bf_volsn; } __packed; @@ -100,7 +100,8 @@ g_label_ntfs_taste(struct g_consumer *cp struct ntfs_attr *atr; off_t voloff; char *filerecp, *ap; - char mftrecsz, vnchar; + int8_t mftrecsz; + char vnchar; int recsize, j; g_topology_assert_not(); @@ -113,7 +114,7 @@ g_label_ntfs_taste(struct g_consumer *cp if (bf == NULL || strncmp(bf->bf_sysid, "NTFS ", 8) != 0) goto done; - mftrecsz = (char)bf->bf_mftrecsz; + mftrecsz = bf->bf_mftrecsz; recsize = (mftrecsz > 0) ? (mftrecsz * bf->bf_bps * bf->bf_spc) : (1 << -mftrecsz); if (recsize == 0 || recsize % pp->sectorsize != 0) goto done;