From owner-freebsd-current@FreeBSD.ORG Mon Jul 13 05:22:28 2009 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 F126E106566B for ; Mon, 13 Jul 2009 05:22:28 +0000 (UTC) (envelope-from john.marshall@riverwillow.com.au) Received: from mail1.riverwillow.net.au (mail1.riverwillow.net.au [203.58.93.36]) by mx1.freebsd.org (Postfix) with ESMTP id 70E8F8FC19 for ; Mon, 13 Jul 2009 05:22:28 +0000 (UTC) (envelope-from john.marshall@riverwillow.com.au) Received: from rwpc12.mby.riverwillow.net.au (rwpc12.mby.riverwillow.net.au [172.25.24.168]) (authenticated bits=0) by mail1.riverwillow.net.au (8.14.3/8.14.3) with ESMTP id n6D5MA1S041771 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 13 Jul 2009 15:22:11 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=riverwillow.com.au; s=m1001; t=1247462531; bh=xIbHauOJ2Yij2pymazwynYR7ko0PQMoSCdGO2Rt7USc=; h=Date:From:To:Cc:Subject:Message-ID:References:Mime-Version: Content-Type:In-Reply-To; b=TTY1VMK7OJsKbCiKNmUaJMTpbsQ7s+HO8UZ4tB9bPcNuQ2payONeRr7z8xIn6bPzJ kQrOOjugjlKbiih+5BqnghUC0LyL+Hd6U995a0AuxJkimOVEW2BuBEuuVY2PmozKS7 nCleNGmeIFrLM2MFcLa4GHOUwa6oYJQUhzrMldRA= Received: from rwpc12.mby.riverwillow.net.au (localhost [127.0.0.1]) by rwpc12.mby.riverwillow.net.au (8.14.3/8.14.3) with ESMTP id n6D5MA14002416; Mon, 13 Jul 2009 15:22:10 +1000 (AEST) (envelope-from john.marshall@riverwillow.com.au) Received: (from john@localhost) by rwpc12.mby.riverwillow.net.au (8.14.3/8.14.3/Submit) id n6D5M9vG002415; Mon, 13 Jul 2009 15:22:09 +1000 (AEST) (envelope-from john) Date: Mon, 13 Jul 2009 15:22:09 +1000 From: John Marshall To: Eygene Ryabinkin Message-ID: <20090713052209.GC982@rwpc12.mby.riverwillow.net.au> Mail-Followup-To: Eygene Ryabinkin , Marcel Moolenaar , freebsd-current@freebsd.org References: <20090710071023.GB32316@rwpc12.mby.riverwillow.net.au> <20090710112631.GE32316@rwpc12.mby.riverwillow.net.au> <3a142e750907100433y307f9b2bya1dc54953bdf5de2@mail.gmail.com> <0B1F6799-2FAC-4C01-A978-42E247979CAB@mac.com> <1z5niluEh3OBPNSdMbOMyoEwzX4@CWODRlDR5RMqbkBfR0/UzHcfNhE> <267A655F-13A6-4D79-A933-3A78854AC5FD@mac.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9jxsPFA5p3P2qPhR" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i OpenPGP: id=A29A84A2; url=http://pki.riverwillow.net.au/pgp/johnmarshall.asc Cc: Marcel Moolenaar , freebsd-current@freebsd.org Subject: Re: 8.0-BETA1 bsdlabel broken? 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: Mon, 13 Jul 2009 05:22:29 -0000 --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, 12 Jul 2009, 03:12 +0400, Eygene Ryabinkin wrote: > OK, changed the patch to make the described checks. And to fix the error > with the previous patch -- it will set the offset for writes to zero, so > it is better to use this patch variant for doing label writes and never > use the previous one for label modifications. Though it was doing the > proper thing for reads. Thank you! I applied this patch to bsdlabel.c and now the utility interprets the labels as expected. rwsrv05# disklabel /dev/da0s1 # /dev/da0s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 1048576 0 4.2BSD 2048 16384 8=20 b: 8388608 1048576 swap =20 c: 33543720 0 unused 0 0 # "raw" part, don't= edit e: 4194304 9437184 4.2BSD 2048 16384 28552=20 f: 19912232 13631488 4.2BSD 2048 16384 28552=20 rwsrv05# disklabel /dev/da0s2 # /dev/da0s2: 8 partitions: # size offset fstype [fsize bsize bps/cpg] c: 67103505 0 unused 0 0 # "raw" part, don't= edit d: 33554432 0 4.2BSD 2048 16384 28552=20 e: 33549073 33554432 4.2BSD 2048 16384 28552=20 > But anyway, bsdlabel won't let you write the label (old, patched with > bad patch, patched with the current patch), since it wants to do it via > the BSD class and our slicer is PART. Another patch will be submitted ;)) --=20 John Marshall --9jxsPFA5p3P2qPhR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iEYEARECAAYFAkpaxIEACgkQw/tAaKKahKJh+ACdHXEHMKrUPW52Y3qYV6zgajJk vokAoIyhupl6HtJv8BdJGA8gBC3owuMF =sFCG -----END PGP SIGNATURE----- --9jxsPFA5p3P2qPhR--