summaryrefslogtreecommitdiff
path: root/sbin/fdisk/cmd.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-10-04 00:09:52 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-10-04 00:09:52 +0000
commit7f42a76984917825029eec6e2f44ed5fe08bb7ff (patch)
treec5df1ced7e43aafd8b3bdc68dedb50f3dce7234f /sbin/fdisk/cmd.c
parentbf307773f67319a124d5be3a26be97e966715719 (diff)
do not ask for confirmation in write
Diffstat (limited to 'sbin/fdisk/cmd.c')
-rw-r--r--sbin/fdisk/cmd.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/sbin/fdisk/cmd.c b/sbin/fdisk/cmd.c
index 4cf6a73a61a..c3e403bfd30 100644
--- a/sbin/fdisk/cmd.c
+++ b/sbin/fdisk/cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd.c,v 1.4 1997/10/02 14:58:30 deraadt Exp $ */
+/* $OpenBSD: cmd.c,v 1.5 1997/10/04 00:09:51 deraadt Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -228,18 +228,13 @@ Xwrite(cmd, disk, mbr, tt, offset)
char mbr_buf[DEV_BSIZE];
int fd;
- if(ask_yn("Are you sure?")){
- printf("Writing MBR at offset %d.\n", offset);
+ printf("Writing MBR at offset %d.\n", offset);
- fd = DISK_open(disk->name, O_RDWR);
- MBR_make(mbr, mbr_buf);
- MBR_write(fd, offset, mbr_buf);
- close(fd);
-
- return(CMD_CLEAN);
- }
-
- return(CMD_CONT);
+ fd = DISK_open(disk->name, O_RDWR);
+ MBR_make(mbr, mbr_buf);
+ MBR_write(fd, offset, mbr_buf);
+ close(fd);
+ return(CMD_CLEAN);
}
int