From owner-svn-src-all@FreeBSD.ORG Thu Nov 28 07:39:31 2013 Return-Path: Delivered-To: svn-src-all@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 1E1F6B92 for ; Thu, 28 Nov 2013 07:39:31 +0000 (UTC) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com [209.85.215.49]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 98DCB1AC5 for ; Thu, 28 Nov 2013 07:39:30 +0000 (UTC) Received: by mail-la0-f49.google.com with SMTP id er20so5623997lab.8 for ; Wed, 27 Nov 2013 23:39:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=WMkjAgP1XYCwMkun7AjO+P5TcCowx90lWdGDrKLnGnI=; b=F0ZycAq1WCQ4nEHw6P7WPsbpPT7rQUlQMc8ZPi1C5NObKqIccS4eIojY5acxyx6oSO GPf8AMOYlxE0rFT9muS+twyPjxPU/yRJ7bs/nFgW0qp+pUQxellkY7JEvx8st4/1Z2g0 PKQBo1FaPMNMZ3L5eeQnNAkad8lENvY9eC8eeQi3mz1kPWBBl+gqx+R5AUUhncrkt1IE lMUkkfuRMqbZdsBWuZYrCTix1/Htx1K2lOyvHVSWTV8b7ekFk+JUNMp5zQIoXQ1veruH x55YCf7W0UmUE7XB11OZPUFt6E1f6bOXufCuLAgajp6Qfi8SJRFaDH4zyBnYtK1AQJhN wcXQ== X-Gm-Message-State: ALoCoQlrzeOLdZ03irnQR3WP5CBEruUcEBqGHkUASW9t9RnS0jpoWcGQSH2qTHVhJSiCJoVBETDG X-Received: by 10.152.28.230 with SMTP id e6mr26427228lah.3.1385624363230; Wed, 27 Nov 2013 23:39:23 -0800 (PST) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.152.234.12 with HTTP; Wed, 27 Nov 2013 23:39:02 -0800 (PST) In-Reply-To: <20131128070003.GY90895@FreeBSD.org> References: <201311271759.rARHxEPE069195@svn.freebsd.org> <20131128070003.GY90895@FreeBSD.org> From: Juli Mallett Date: Wed, 27 Nov 2013 23:39:02 -0800 X-Google-Sender-Auth: g6o0NvG9wyJZHOJmYEWPN7ChsHE Message-ID: Subject: Re: svn commit: r258686 - head/sbin/fdisk To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.16 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 07:39:31 -0000 On Wed, Nov 27, 2013 at 11:00 PM, Gleb Smirnoff wrote: > 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? > Habit? Hysterical reasons? Ease-of-use? (The fact that I find fdisk(8) easier to use than gpart(8) is probably a bug in me and not in gpart(8), but it always takes me too many steps to get things done with gpart(8), including some manpage reading.) Being fairly self-contained so that one can use it in automated systems without worrying about which geom(4) modules are in the host system's kernel is probably the most-reasonable version. If it's so deprecated that leaving bugs in it is desirable, please remove it from the tree entirely :) Thanks, Juli.