From owner-freebsd-current@FreeBSD.ORG Fri Apr 8 22:01:16 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82FF4106566C for ; Fri, 8 Apr 2011 22:01:16 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout030.mac.com (asmtpout030.mac.com [17.148.16.105]) by mx1.freebsd.org (Postfix) with ESMTP id 699108FC0C for ; Fri, 8 Apr 2011 22:01:16 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from sa-nc-finance-165.static.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp030.mac.com (Oracle Communications Messaging Exchange Server 7u4-20.01 64bit (built Nov 21 2010)) with ESMTPSA id <0LJC0006JT5QI930@asmtp030.mac.com> for freebsd-current@freebsd.org; Fri, 08 Apr 2011 15:01:16 -0700 (PDT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.2.15,1.0.148,0.0.0000 definitions=2011-04-08_08:2011-04-09, 2011-04-08, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=2 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1012030000 definitions=main-1104080140 From: Marcel Moolenaar In-reply-to: <201104082134.15674.hselasky@c2i.net> Date: Fri, 08 Apr 2011 15:01:01 -0700 Message-id: <127C6AAD-9586-4B85-9297-F4BAF4BC61C3@mac.com> References: <201104082134.15674.hselasky@c2i.net> To: Hans Petter Selasky X-Mailer: Apple Mail (2.1084) Cc: "freebsd-current@FreeBSD.org" Subject: Re: Fdisk formatting of disk having bs=1K fails X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Apr 2011 22:01:16 -0000 On Apr 8, 2011, at 12:34 PM, Hans Petter Selasky wrote: > Hi, > > It appears that src/sbin/fdisk.c can only read the MBR of disks having a > blocksize different than 512 bytes. When writing a new MBR, the below check > fails. Can someone having knowledge into fdisk, fix this issue and MFC to 8- > stable? Also I'm curious about the #ifdef __ia64__ . You can eliminate the __ia64__ conditional if you want. From the commit log: ======== r95860 | peter | 2002-05-01 06:48:29 +0000 (Wed, 01 May 2002) | 4 lines Add a hack so that fdisk(8) can initialize an ia64 disk. There is no /boot/mbr to read the boot code from (ia64 does not *have* bootblocks!). fdisk depended on magic in the /boot/mbr file to initialize some fields. ======== fdisk is not compiled for ia64 anymore since the introduction of gpart. The same holds for bsdlabel. So, that means that the hack is not needed anymore. FYI, -- Marcel Moolenaar xcllnt@mac.com