diff options
author | dfr <dfr@FreeBSD.org> | 1999-05-09 11:34:58 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1999-05-09 11:34:58 +0000 |
commit | d04db090212fbb1e537b66a4836ea87273899655 (patch) | |
tree | 5e1ece1ccb596cf3655dd2283d1bf3276774a1f8 /lib | |
parent | 94c48499c77c22afb20f9d550f5a0fca5e77de74 (diff) | |
download | FreeBSD-src-d04db090212fbb1e537b66a4836ea87273899655.zip FreeBSD-src-d04db090212fbb1e537b66a4836ea87273899655.tar.gz |
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).
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libdisk/disk.c | 3 | ||||
-rw-r--r-- | lib/libdisk/write_disk.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/libdisk/disk.c b/lib/libdisk/disk.c index 591c5e9..67c3867 100644 --- a/lib/libdisk/disk.c +++ b/lib/libdisk/disk.c @@ -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 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; } |