From ce49697787054f99e7d79d569abc5518051fd1e5 Mon Sep 17 00:00:00 2001 From: jkh Date: Fri, 8 Jan 1999 00:32:19 +0000 Subject: Changes for alpha support. Submitted by: dfr --- lib/libdisk/create_chunk.c | 11 ++++++++++- lib/libdisk/write_disk.c | 12 +++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) (limited to 'lib/libdisk') diff --git a/lib/libdisk/create_chunk.c b/lib/libdisk/create_chunk.c index d5c89c6..6e7569d 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.31 1998/09/15 10:23:17 gibbs Exp $ + * $Id: create_chunk.c,v 1.32 1998/10/27 21:14:03 msmith Exp $ * */ @@ -151,6 +151,7 @@ Fixup_Names(struct disk *d) continue; if (strcmp(c2->name,"X")) continue; +#ifndef __alpha__ c2->oname = malloc(12); if(!c2->oname) err(1,"malloc failed"); for(j=1;j<=NDOSPART;j++) { @@ -167,6 +168,10 @@ Fixup_Names(struct disk *d) } if (c2->oname) free(c2->oname); +#else + free(c2->name); + c2->name = strdup(c1->name); +#endif } for(c2 = c1->part; c2 ; c2 = c2->next) { if (c2->type == freebsd) { @@ -281,6 +286,7 @@ MakeDev(struct chunk *c1, const char *path) unit += (*p - '0'); p++; } +#ifndef __alpha__ if (*p != 's') { msgDebug("MakeDev: `%s' is not a valid slice delimiter\n", p); return 0; @@ -298,6 +304,9 @@ MakeDev(struct chunk *c1, const char *path) p++; } slice = slice + 1; +#else + slice = 0; +#endif if (!*p) { part = 2; if(c1->type == freebsd) diff --git a/lib/libdisk/write_disk.c b/lib/libdisk/write_disk.c index 799e5a1..b27d17b 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.23 1998/10/06 11:57:08 dfr Exp $ + * $Id: write_disk.c,v 1.24 1998/10/27 21:14:03 msmith Exp $ * */ @@ -110,6 +110,14 @@ Write_FreeBSD(int fd, struct disk *new, struct disk *old, struct chunk *c1) #ifdef __alpha__ /* + * Tell SRM where the bootstrap is. + */ + lp = (u_long *)buf; + lp[60] = 15; + lp[61] = 1; + lp[62] = 0; + + /* * Generate the bootblock checksum for the SRM console. */ for (lp = (u_long *)buf, i = 0, sum = 0; i < 63; i++) @@ -242,6 +250,7 @@ Write_Disk(struct disk *d1) if (dp[i].dp_typ == 0xa5) dp[i].dp_flag = 0x80; +#ifndef __alpha__ mbr = read_block(fd,WHERE(0,d1)); if (d1->bootmgr) memcpy(mbr,d1->bootmgr,DOSPARTOFF); @@ -249,6 +258,7 @@ Write_Disk(struct disk *d1) mbr[512-2] = 0x55; mbr[512-1] = 0xaa; write_block(fd,WHERE(0,d1),mbr); +#endif i = 1; i = ioctl(fd,DIOCSYNCSLICEINFO,&i); -- cgit v1.1