From owner-svn-src-head@freebsd.org Wed Aug 17 15:16:54 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6640BBC03C; Wed, 17 Aug 2016 15:16:54 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8EC8E1832; Wed, 17 Aug 2016 15:16:54 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id A70CF1FE022; Wed, 17 Aug 2016 17:16:46 +0200 (CEST) Subject: Re: svn commit: r304142 - head/usr.sbin/bsdinstall/partedit To: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= References: <201608150930.u7F9UL1V069576@repo.freebsd.org> <861t1n6749.fsf@desk.des.no> <581c856c-826b-529e-c9c6-a397fb679708@freebsd.org> <20160817144944.GM22212@zxy.spb.ru> <4a28f419-5293-0753-068d-1e07ddb01c2d@selasky.org> <86shu34erp.fsf@desk.des.no> Cc: Slawa Olhovchenkov , Nathan Whitehorn , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org From: Hans Petter Selasky Message-ID: Date: Wed, 17 Aug 2016 17:21:15 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <86shu34erp.fsf@desk.des.no> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 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: Wed, 17 Aug 2016 15:16:54 -0000 On 08/17/16 17:05, Dag-Erling Smørgrav wrote: > Hans Petter Selasky writes: >> Not sure if it is an issue, but what will happen if a magic disk has a >> size less than 4K and uses a block size of 512bytes and the disk >> alignment gets rounded up to 4K. Will any of logic in this patch fail >> or hang? > > What is a magic disk, and why would you want to install FreeBSD on a > drive with less than 4096 bytes available? > Hi, My intention is not to install FreeBSD on a 3K disk. My question is pure mathematical, if the bsdinstall will segfault, division by zero or anything like that, if one should try to install FreeBSD on a 3K disk, because you round up the size of the disk to be bigger than it actually is. Should there be a check for too small disks in there? --HPS