From owner-svn-src-head@FreeBSD.ORG Thu Nov 28 07:00:06 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66FB1CC; Thu, 28 Nov 2013 07:00:06 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 75FFB18FD; Thu, 28 Nov 2013 07:00:05 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id rAS703b7030080 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 28 Nov 2013 11:00:03 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id rAS703cH030079; Thu, 28 Nov 2013 11:00:03 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 28 Nov 2013 11:00:03 +0400 From: Gleb Smirnoff To: Juli Mallett Subject: Re: svn commit: r258686 - head/sbin/fdisk Message-ID: <20131128070003.GY90895@FreeBSD.org> References: <201311271759.rARHxEPE069195@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201311271759.rARHxEPE069195@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.16 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: Thu, 28 Nov 2013 07:00:06 -0000 Juli, On Wed, Nov 27, 2013 at 05:59:14PM +0000, Juli Mallett wrote: J> Author: jmallett J> Date: Wed Nov 27 17:59:13 2013 J> New Revision: 258686 J> URL: http://svnweb.freebsd.org/changeset/base/258686 J> J> Log: J> Fix fdisk(8) to create 2TB partitions on disks larger than 2TB, rather than J> only being able to create 1TB partitions: J> o) Use an unsigned 32-bit quantity to store the number of disk sectors. J> o) Detect overflow of said 32-bit quantity and clamp to 2^32. J> o) Rather than returning the disk sector count from get_params, return 0 on J> success, since its return value is only ever compared to -1 to detect J> failure. This would cause returning 2^32 sectors to be interpreted as an J> error. J> J> Reviewed by: bde ("good for a quick fix") What is the reason to use fdisk today, instead of gpart? -- Totus tuus, Glebius.