From 86577745c3eca1e167dae4ead82cd0f05028362b Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Mon, 15 May 1995 19:03:08 +0000 Subject: [PATCH] Fixed the calculation of the reserved space for bad144. Thanks Rod! --- lib/libdisk/create_chunk.c | 4 ++-- release/libdisk/create_chunk.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libdisk/create_chunk.c b/lib/libdisk/create_chunk.c index 3be45608f2b1..18f71e3a3e00 100644 --- a/lib/libdisk/create_chunk.c +++ b/lib/libdisk/create_chunk.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: create_chunk.c,v 1.15 1995/05/12 18:49:57 phk Exp $ + * $Id: create_chunk.c,v 1.16 1995/05/15 00:58:25 phk Exp $ * */ @@ -180,7 +180,7 @@ Create_Chunk_DWIM(struct disk *d, struct chunk *parent , u_long size, chunk_e ty return 0; found: if (c1->flags & CHUNK_BAD144) { - edge = c1->end - (d->bios_hd * d->bios_sect); + edge = c1->end - d->bios_sect - 127; if (offset > edge) return 0; if (offset + size > edge) diff --git a/release/libdisk/create_chunk.c b/release/libdisk/create_chunk.c index 3be45608f2b1..18f71e3a3e00 100644 --- a/release/libdisk/create_chunk.c +++ b/release/libdisk/create_chunk.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: create_chunk.c,v 1.15 1995/05/12 18:49:57 phk Exp $ + * $Id: create_chunk.c,v 1.16 1995/05/15 00:58:25 phk Exp $ * */ @@ -180,7 +180,7 @@ Create_Chunk_DWIM(struct disk *d, struct chunk *parent , u_long size, chunk_e ty return 0; found: if (c1->flags & CHUNK_BAD144) { - edge = c1->end - (d->bios_hd * d->bios_sect); + edge = c1->end - d->bios_sect - 127; if (offset > edge) return 0; if (offset + size > edge)