From 243631e75e912b3a1ae323f24d970700732ea16c Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 16 Oct 2013 12:03:48 +0200 Subject: [PATCH] libfdisk: (bsd) leave context if new disklabel unwanted Signed-off-by: Karel Zak --- libfdisk/src/bsd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libfdisk/src/bsd.c b/libfdisk/src/bsd.c index ca55a13a9a..e898319fbb 100644 --- a/libfdisk/src/bsd.c +++ b/libfdisk/src/bsd.c @@ -282,9 +282,10 @@ static int bsd_create_disklabel(struct fdisk_context *cxt) rc = fdisk_ask_yesno(cxt, _("Do you want to create a BSD disklabel?"), &yes); - - if (rc || !yes) + if (rc) return rc; + if (!yes) + return 1; if (cxt->parent) { rc = bsd_assign_dos_partition(cxt); if (rc == 1) -- 2.47.2