From 021b1e61da72a756bc8f87b139948c264ab03d85 Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 8 May 1995 02:08:33 +0000 Subject: Recognize slice type #6 as dos handle OnTrack Disk manager correctly. --- lib/libdisk/disk.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lib/libdisk/disk.c') diff --git a/lib/libdisk/disk.c b/lib/libdisk/disk.c index 1912fdc..f38a99f 100644 --- a/lib/libdisk/disk.c +++ b/lib/libdisk/disk.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: disk.c,v 1.16 1995/05/04 07:00:54 phk Exp $ + * $Id: disk.c,v 1.17 1995/05/06 03:28:29 phk Exp $ * */ @@ -53,6 +53,7 @@ Int_Open_Disk(char *name, u_long size) struct disk *d; struct dos_partition *dp; void *p; + u_long offset = 0; strcpy(device,"/dev/r"); strcat(device,name); @@ -94,8 +95,10 @@ Int_Open_Disk(char *name, u_long size) if (dp->dp_start+dp->dp_size >= size) continue; if (!dp->dp_size) continue; - if (dp->dp_typ == DOSPTYP_ONTRACK) + if (dp->dp_typ == DOSPTYP_ONTRACK) { d->flags |= DISK_ON_TRACK; + offset = 63; + } } free(p); @@ -109,7 +112,7 @@ Int_Open_Disk(char *name, u_long size) if (dl.d_ntracks && dl.d_nsectors) d->bios_cyl = size/(dl.d_ntracks*dl.d_nsectors); - if (Add_Chunk(d, 0, size, name,whole,0,0)) + if (Add_Chunk(d, -offset, size, name,whole,0,0)) warn("Failed to add 'whole' chunk"); for(i=BASE_SLICE;i