From 35ea9462db142208332ba6fe901b5e866a0f0c2f Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Fri, 29 Jan 1999 11:39:24 +0000 Subject: More support for Alpha installs. Submitted by: dfr --- lib/libdisk/write_disk.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lib/libdisk/write_disk.c') diff --git a/lib/libdisk/write_disk.c b/lib/libdisk/write_disk.c index b27d17b2c79e..088b3236347a 100644 --- a/lib/libdisk/write_disk.c +++ b/lib/libdisk/write_disk.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: write_disk.c,v 1.24 1998/10/27 21:14:03 msmith Exp $ + * $Id: write_disk.c,v 1.25 1999/01/08 00:32:19 jkh Exp $ * */ @@ -64,7 +64,11 @@ Write_FreeBSD(int fd, struct disk *new, struct disk *old, struct chunk *c1) for(c2=c1->part;c2;c2=c2->next) { if (c2->type == unused) continue; if (!strcmp(c2->name,"X")) continue; +#ifdef __alpha__ + j = c2->name[strlen(c2->name) - 1] - 'a'; +#else j = c2->name[strlen(new->name) + 2] - 'a'; +#endif if (j < 0 || j >= MAXPARTITIONS || j == RAW_PART) { #ifdef DEBUG warn("Weird parititon letter %c",c2->name[strlen(new->name) + 2]); @@ -180,16 +184,19 @@ Write_Disk(struct disk *d1) for (c1=d1->chunks->part; c1 ; c1 = c1->next) { if (c1->type == unused) continue; if (!strcmp(c1->name,"X")) continue; +#ifndef __alpha__ j = c1->name[4] - '1'; j = c1->name[strlen(d1->name) + 1] - '1'; if (j < 0 || j > 3) continue; s[j]++; +#endif if (c1->type == extended) ret += Write_Extended(fd, d1,old,c1); if (c1->type == freebsd) ret += Write_FreeBSD(fd, d1,old,c1); +#ifndef __alpha__ Write_Int32(&dp[j].dp_start, c1->offset); Write_Int32(&dp[j].dp_size, c1->size); @@ -237,7 +244,9 @@ Write_Disk(struct disk *d1) dp[j].dp_flag = 0x80; else dp[j].dp_flag = 0; +#endif } +#ifndef __alpha__ j = 0; for(i=0;ibootmgr) memcpy(mbr,d1->bootmgr,DOSPARTOFF); -- cgit v1.2.3