Back out the last change to disk.c - a kernel change removed the need.
Enabled writing to the disklabel when writing a disk (only affects alpha).
This commit is contained in:
parent
c586a73949
commit
c914395258
@ -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.42 1999/05/04 22:44:48 msmith Exp $
|
||||
* $Id: disk.c,v 1.43 1999/05/08 21:21:50 dfr Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -241,7 +241,6 @@ Int_Open_Disk(const char *name, u_long size)
|
||||
|
||||
strcpy(pname,"/dev/r");
|
||||
strcat(pname,name);
|
||||
strcat(pname,"c");
|
||||
j = open(pname,O_RDONLY);
|
||||
if (j < 0) {
|
||||
#ifdef DEBUG
|
||||
|
@ -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.25 1999/01/08 00:32:19 jkh Exp $
|
||||
* $Id: write_disk.c,v 1.26 1999/01/29 11:39:24 jkh Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -163,6 +163,8 @@ Write_Disk(struct disk *d1)
|
||||
u_char *mbr;
|
||||
struct dos_partition *dp,work[NDOSPART];
|
||||
int s[4];
|
||||
int one = 1;
|
||||
int zero = 0;
|
||||
|
||||
strcpy(device,"/dev/r");
|
||||
strcat(device,d1->name);
|
||||
@ -174,6 +176,7 @@ Write_Disk(struct disk *d1)
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
ioctl(fd, DIOCWLABEL, &one);
|
||||
|
||||
memset(s,0,sizeof s);
|
||||
mbr = read_block(fd,WHERE(0,d1));
|
||||
@ -274,6 +277,7 @@ Write_Disk(struct disk *d1)
|
||||
if (i != 0)
|
||||
warn("ioctl(DIOCSYNCSLICEINFO)");
|
||||
#endif
|
||||
ioctl(fd, DIOCWLABEL, &zero);
|
||||
close(fd);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user