Changes for alpha support.
Submitted by: dfr
This commit is contained in:
parent
2bd023c3bc
commit
ce49697787
@ -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)
|
||||
|
@ -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 $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -109,6 +109,14 @@ Write_FreeBSD(int fd, struct disk *new, struct disk *old, struct chunk *c1)
|
||||
dl->d_checksum = dkcksum(dl);
|
||||
|
||||
#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.
|
||||
*/
|
||||
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user