Date: Sun, 5 May 2013 08:00:17 +0000 (UTC) From: Stanislav Sedov <stas@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250264 - head/sys/geom/label Message-ID: <201305050800.r4580HrN076303@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <ilya@bakulin.de> 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305050800.r4580HrN076303>