From owner-freebsd-current Wed Nov 20 1:57:12 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BD73137B401 for ; Wed, 20 Nov 2002 01:57:10 -0800 (PST) Received: from watery.cc.kogakuin.ac.jp (watery.cc.kogakuin.ac.jp [133.80.152.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id C3DC343E3B for ; Wed, 20 Nov 2002 01:57:09 -0800 (PST) (envelope-from nyan@jp.FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) by watery.cc.kogakuin.ac.jp (8.12.6/8.12.6) with ESMTP id gAK9v3nq018891; Wed, 20 Nov 2002 18:57:03 +0900 (JST) (envelope-from nyan@jp.FreeBSD.org) Date: Wed, 20 Nov 2002 18:56:48 +0900 (JST) Message-Id: <20021120.185648.74735481.nyan@jp.FreeBSD.org> To: kuriyama@imgsrc.co.jp Cc: freebsd-current@FreeBSD.ORG Subject: Re: fdisk editor in DP2 From: Takahashi Yoshihiro In-Reply-To: <7mof8k7qdx.wl@black.imgsrc.co.jp> References: <7mof8k7qdx.wl@black.imgsrc.co.jp> X-Mailer: Mew version 2.2 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Wed_Nov_20_18:56:48_2002_697)--" Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ----Next_Part(Wed_Nov_20_18:56:48_2002_697)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit In article <7mof8k7qdx.wl@black.imgsrc.co.jp> Jun Kuriyama writes: > When entering fdisk editor after booting from CD-ROM, I cannot delete > NTFS partition by "D" key. "D" key only shows cursor up (NTFS is at > offset 63, offset 0 seems boot selector for NT). > > Can I do something for debugging? I think this patch solves the problem. --- TAKAHASHI Yoshihiro ----Next_Part(Wed_Nov_20_18:56:48_2002_697)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="libdisk.diff" Index: chunk.c =================================================================== RCS file: /home/ncvs/src/lib/libdisk/chunk.c,v retrieving revision 1.45 diff -u -r1.45 chunk.c --- chunk.c 15 Nov 2002 13:24:29 -0000 1.45 +++ chunk.c 20 Nov 2002 04:57:30 -0000 @@ -416,24 +416,27 @@ int Delete_Chunk2(struct disk *d, struct chunk *c, int rflags) { - struct chunk *c1 = 0, *c2, *c3; + struct chunk *c1, *c2, *c3; chunk_e type = c->type; u_long offset = c->offset; - if(type == whole) + switch (type) { + case whole: + case unused: return 1; -#ifndef PC98 - if (!c1 && (type == freebsd || type == fat || type == unknown)) - c1 = Find_Mother_Chunk(d->chunks, c->offset, c->end, extended); -#endif - if (!c1 && (type == freebsd || type == fat || type == unknown)) - c1 = Find_Mother_Chunk(d->chunks, c->offset, c->end, whole); -#ifndef PC98 - if (!c1 && type == extended) + case extended: c1 = Find_Mother_Chunk(d->chunks, c->offset, c->end, whole); -#endif - if (!c1 && type == part) + break; + case part: c1 = Find_Mother_Chunk(d->chunks, c->offset, c->end, freebsd); + break; + default: + c1 = Find_Mother_Chunk(d->chunks, c->offset, c->end, extended); + if (!c1) + c1 = Find_Mother_Chunk(d->chunks, c->offset, c->end, + whole); + break; + } if (!c1) return 1; for (c2 = c1->part; c2; c2 = c2->next) { ----Next_Part(Wed_Nov_20_18:56:48_2002_697)---- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message