diff options
author | phk <phk@FreeBSD.org> | 2002-10-23 20:02:33 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-10-23 20:02:33 +0000 |
commit | c17cb9154e1a582900dd2490500b470563329312 (patch) | |
tree | 66cb94d3b1f1f2cd7c7377ed999c7ea317e63df5 /lib/libdisk/write_alpha_disk.c | |
parent | 3c688df1144b5bdaff8d7a1bb0a2b070aeb58570 (diff) | |
download | FreeBSD-src-c17cb9154e1a582900dd2490500b470563329312.zip FreeBSD-src-c17cb9154e1a582900dd2490500b470563329312.tar.gz |
Remove unnecessary ioctls tickling kernel side to realize that we fiddled
with the disk. GEOM will automatically retaste when we closet he filedesc.
Diffstat (limited to 'lib/libdisk/write_alpha_disk.c')
-rw-r--r-- | lib/libdisk/write_alpha_disk.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/libdisk/write_alpha_disk.c b/lib/libdisk/write_alpha_disk.c index 313aae4..0e902f0 100644 --- a/lib/libdisk/write_alpha_disk.c +++ b/lib/libdisk/write_alpha_disk.c @@ -73,7 +73,7 @@ Write_FreeBSD(int fd, const struct disk *new, const struct disk *old, const stru int Write_Disk(const struct disk *d1) { - int fd,i; + int fd; struct disk *old = 0; struct chunk *c1; int ret = 0; @@ -81,8 +81,6 @@ Write_Disk(const struct disk *d1) u_char *mbr; struct dos_partition *dp,work[NDOSPART]; int s[4]; - int one = 1; - int zero = 0; strcpy(device,_PATH_DEV); strcat(device,d1->name); @@ -95,7 +93,6 @@ Write_Disk(const struct disk *d1) #endif return 1; } - ioctl(fd, DIOCWLABEL, &one); memset(s,0,sizeof s); mbr = read_block(fd, 0, d1->sector_size); @@ -111,13 +108,6 @@ Write_Disk(const struct disk *d1) } - i = 1; - i = ioctl(fd, DIOCSYNCSLICEINFO, &i); -#ifdef DEBUG - if (i != 0) - warn("ioctl(DIOCSYNCSLICEINFO)"); -#endif - ioctl(fd, DIOCWLABEL, &zero); close(fd); return 0; } |