From d04db090212fbb1e537b66a4836ea87273899655 Mon Sep 17 00:00:00 2001 From: dfr Date: Sun, 9 May 1999 11:34:58 +0000 Subject: 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). --- lib/libdisk/write_disk.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/libdisk/write_disk.c') diff --git a/lib/libdisk/write_disk.c b/lib/libdisk/write_disk.c index 088b323..de7f3ed 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.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; } -- cgit v1.1