summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-10-02 14:58:32 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-10-02 14:58:32 +0000
commit1a83879f7485d4127f77f61caa00d2ce35a354fb (patch)
tree646a4811f06a7d8f2297c7dff43184b0e5698cfa /sbin
parentb001d3c4ea53925791e6669e47644d3d8728239d (diff)
do not whine if user quits without mods
Diffstat (limited to 'sbin')
-rw-r--r--sbin/fdisk/cmd.c6
-rw-r--r--sbin/fdisk/user.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/sbin/fdisk/cmd.c b/sbin/fdisk/cmd.c
index 1be44585835..4cf6a73a61a 100644
--- a/sbin/fdisk/cmd.c
+++ b/sbin/fdisk/cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd.c,v 1.3 1997/09/30 00:07:25 mickey Exp $ */
+/* $OpenBSD: cmd.c,v 1.4 1997/10/02 14:58:30 deraadt Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -263,6 +263,10 @@ Xquit(cmd, disk, mbr, tt, offset)
mbr_t *tt;
int offset;
{
+ extern int modified;
+
+ if (modified == 0)
+ exit(0);
if(ask_yn("You really want to quit?"))
exit(0);
diff --git a/sbin/fdisk/user.c b/sbin/fdisk/user.c
index 86e54992e31..2e40a0fa260 100644
--- a/sbin/fdisk/user.c
+++ b/sbin/fdisk/user.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: user.c,v 1.5 1997/10/02 14:55:30 deraadt Exp $ */
+/* $OpenBSD: user.c,v 1.6 1997/10/02 14:58:31 deraadt Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -109,6 +109,8 @@ USER_init(disk, tt)
return(0);
}
+int modified;
+
int
USER_modify(disk, tt, offset)
disk_t *disk;
@@ -118,7 +120,7 @@ USER_modify(disk, tt, offset)
char mbr_buf[DEV_BSIZE];
mbr_t mbr;
cmd_t cmd;
- int i, st, fd, modified = 0;
+ int i, st, fd;
/* Set up command table pointer */