diff options
author | Karel Zak | 2013-10-16 12:03:48 +0200 |
---|---|---|
committer | Karel Zak | 2013-10-16 12:03:48 +0200 |
commit | 243631e75e912b3a1ae323f24d970700732ea16c (patch) | |
tree | 16f143e05a851ca9d16030261b8092f4e572a8f6 /libfdisk/src/bsd.c | |
parent | docs: update TODO (diff) | |
download | kernel-qcow2-util-linux-243631e75e912b3a1ae323f24d970700732ea16c.tar.gz kernel-qcow2-util-linux-243631e75e912b3a1ae323f24d970700732ea16c.tar.xz kernel-qcow2-util-linux-243631e75e912b3a1ae323f24d970700732ea16c.zip |
libfdisk: (bsd) leave context if new disklabel unwanted
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk/src/bsd.c')
-rw-r--r-- | libfdisk/src/bsd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libfdisk/src/bsd.c b/libfdisk/src/bsd.c index ca55a13a9..e898319fb 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) |