Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Apr 2012 05:16:20 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r234411 - stable/8/sbin/bsdlabel
Message-ID:  <201204180516.q3I5GKhd015992@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Wed Apr 18 05:16:20 2012
New Revision: 234411
URL: http://svn.freebsd.org/changeset/base/234411

Log:
  MFC r234122:
    It seems that libdisk(3) incorrectly sets d_secperunit value.
    Automatically fix it like GEOM_PART_BSD does.
  
    PR:		bin/165789

Modified:
  stable/8/sbin/bsdlabel/bsdlabel.c
Directory Properties:
  stable/8/sbin/bsdlabel/   (props changed)

Modified: stable/8/sbin/bsdlabel/bsdlabel.c
==============================================================================
--- stable/8/sbin/bsdlabel/bsdlabel.c	Wed Apr 18 05:16:02 2012	(r234410)
+++ stable/8/sbin/bsdlabel/bsdlabel.c	Wed Apr 18 05:16:20 2012	(r234411)
@@ -1187,7 +1187,8 @@ checklabel(struct disklabel *lp)
 			lp->d_interleave = vl->d_interleave;
 		if (lp->d_secpercyl == 0)
 			lp->d_secpercyl = vl->d_secpercyl;
-		if (lp->d_secperunit == 0)
+		if (lp->d_secperunit == 0 ||
+		    lp->d_secperunit > vl->d_secperunit)
 			lp->d_secperunit = vl->d_secperunit;
 		if (lp->d_bbsize == 0)
 			lp->d_bbsize = vl->d_bbsize;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204180516.q3I5GKhd015992>