]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libfdisk: (bsd) leave context if new disklabel unwanted
authorKarel Zak <kzak@redhat.com>
Wed, 16 Oct 2013 10:03:48 +0000 (12:03 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 16 Oct 2013 10:03:48 +0000 (12:03 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/src/bsd.c

index ca55a13a9acfca14399ad3d8a42d0bce2afc7c26..e898319fbb105303c70ab47e4fb0c8c8b9b97876 100644 (file)
@@ -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)