Date: Wed, 20 Nov 2002 18:56:48 +0900 (JST) From: Takahashi Yoshihiro <nyan@jp.FreeBSD.org> To: kuriyama@imgsrc.co.jp Cc: freebsd-current@FreeBSD.ORG Subject: Re: fdisk editor in DP2 Message-ID: <20021120.185648.74735481.nyan@jp.FreeBSD.org> In-Reply-To: <7mof8k7qdx.wl@black.imgsrc.co.jp> References: <7mof8k7qdx.wl@black.imgsrc.co.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
----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 <kuriyama@imgsrc.co.jp> 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 <nyan@FreeBSD.org>
----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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021120.185648.74735481.nyan>
