From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QdW8C-0005nN-2H for mharc-grub-devel@gnu.org; Sun, 03 Jul 2011 19:31:16 -0400 Received: from eggs.gnu.org ([140.186.70.92]:43960) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdW88-0005mZ-JB for grub-devel@gnu.org; Sun, 03 Jul 2011 19:31:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QdW87-0000c3-Aj for grub-devel@gnu.org; Sun, 03 Jul 2011 19:31:12 -0400 Received: from mail-fx0-f52.google.com ([209.85.161.52]:35693) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdW85-0000bP-Qx for grub-devel@gnu.org; Sun, 03 Jul 2011 19:31:10 -0400 Received: by fxd18 with SMTP id 18so4216208fxd.39 for ; Sun, 03 Jul 2011 16:31:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type; bh=OGHUl4/4PKMzv+es0AW7PH+OJuRLeOghlR0/uywXPcY=; b=q7wB8VYWeSupFqieflKKjpPx82CqZ8CfgFt3cfROY6GAFXffHFazvVuCcOHak3XG46 2mpQ3VT8N37xkUd5psam85BqsFwLPjbXieqPr9sKDv5Tz7TAgsvh+Re5mNevzqO6ejLA g+fCqui6a7uxOxyQg56sErvV5jJZPOkrT9kBc= Received: by 10.223.9.217 with SMTP id m25mr8386230fam.122.1309735867622; Sun, 03 Jul 2011 16:31:07 -0700 (PDT) Received: from [192.168.1.50] (c2433-1-88-160-112-182.fbx.proxad.net [88.160.112.182]) by mx.google.com with ESMTPS id 21sm3990645fay.45.2011.07.03.16.31.06 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 03 Jul 2011 16:31:06 -0700 (PDT) Message-ID: <4E10FBB9.5000008@gmail.com> Date: Mon, 04 Jul 2011 01:31:05 +0200 From: =?ISO-8859-1?Q?Gr=E9goire_Sutre?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110606 Iceowl/1.0b2 Icedove/3.1.10 MIME-Version: 1.0 To: The development of GNU GRUB Subject: [PATCH] Sector size on NetBSD Content-Type: multipart/mixed; boundary="------------050203030509030709070806" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.161.52 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jul 2011 23:31:14 -0000 This is a multi-part message in MIME format. --------------050203030509030709070806 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Hi, NetBSD does not know about BLKSSZGET. The attached patch retrieves the sector size from the disk label (for NetBSD). Grégoire --------------050203030509030709070806 Content-Type: text/plain; name="patch-sector-size-from-disklabel" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="patch-sector-size-from-disklabel" === modified file 'ChangeLog' --- ChangeLog 2011-07-02 19:22:19 +0000 +++ ChangeLog 2011-07-03 22:52:47 +0000 @@ -1,3 +1,8 @@ +2011-07-03 GrĂ©goire Sutre + + * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_open) [__NetBSD__]: + Get sector size from disk label. + 2011-07-02 GrĂ©goire Sutre * util/grub-mkconfig.in: Use @PACKAGE@ instead of hardcoded name when === modified file 'grub-core/kern/emu/hostdisk.c' --- grub-core/kern/emu/hostdisk.c 2011-06-23 20:02:05 +0000 +++ grub-core/kern/emu/hostdisk.c 2011-07-03 22:49:26 +0000 @@ -301,11 +301,15 @@ goto fail; } +# if defined(__NetBSD__) + sector_size = label.d_secsize; +# else if (ioctl (fd, BLKSSZGET, §or_size)) { close (fd); goto fail; } +# endif close (fd); --------------050203030509030709070806--