summaryrefslogtreecommitdiffstats
path: root/sbin/disklabel/editor.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2009-04-20 17:40:43 +0000
committerderaadt <deraadt@openbsd.org>2009-04-20 17:40:43 +0000
commit94e4e53fdc422c6c57f44dda820bc131e0155175 (patch)
tree9d35eb05064ae6873d9abb631d4980cb6a386a25 /sbin/disklabel/editor.c
parentfix previous, evtimer_set should be called only once, in session_init. (diff)
downloadwireguard-openbsd-94e4e53fdc422c6c57f44dda820bc131e0155175.tar.xz
wireguard-openbsd-94e4e53fdc422c6c57f44dda820bc131e0155175.zip
No this change is wrong, because now 'w' followed by 'q' asks if you
are sure. This will require another solution, based perhaps on comparing against an earlier form of the label
Diffstat (limited to 'sbin/disklabel/editor.c')
-rw-r--r--sbin/disklabel/editor.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c
index 612c4f35a7d..bc5380d580d 100644
--- a/sbin/disklabel/editor.c
+++ b/sbin/disklabel/editor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: editor.c,v 1.192 2009/04/18 00:15:46 sthen Exp $ */
+/* $OpenBSD: editor.c,v 1.193 2009/04/20 17:40:43 deraadt Exp $ */
/*
* Copyright (c) 1997-2000 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -17,7 +17,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: editor.c,v 1.192 2009/04/18 00:15:46 sthen Exp $";
+static char rcsid[] = "$OpenBSD: editor.c,v 1.193 2009/04/20 17:40:43 deraadt Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -317,8 +317,7 @@ editor(struct disklabel *lp, int f)
* didn't change the label read from disk, there is no
* need to do anything before exiting.
*/
- if (!aflag && !dflag &&
- memcmp(lp, &label, sizeof(label)) == 0) {
+ if (!dflag && memcmp(lp, &label, sizeof(label)) == 0) {
puts("No label changes.");
return(1);
}