diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-10-02 14:58:32 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-10-02 14:58:32 +0000 |
commit | 1a83879f7485d4127f77f61caa00d2ce35a354fb (patch) | |
tree | 646a4811f06a7d8f2297c7dff43184b0e5698cfa | |
parent | b001d3c4ea53925791e6669e47644d3d8728239d (diff) |
do not whine if user quits without mods
-rw-r--r-- | sbin/fdisk/cmd.c | 6 | ||||
-rw-r--r-- | sbin/fdisk/user.c | 6 |
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 */ |