]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libfdisk: (dos) don't inform about logical partition
authorKarel Zak <kzak@redhat.com>
Wed, 8 Oct 2014 11:00:19 +0000 (13:00 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 8 Oct 2014 11:00:19 +0000 (13:00 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/src/dos.c

index b1c9db9c5b0537627515c5851c6da7134ef21f19..6c30df743d5918f75e72f6e5f60b22a340a026f6 100644 (file)
@@ -1185,8 +1185,11 @@ static int add_logical(struct fdisk_context *cxt,
 
        cxt->label->nparts_max++;
 
-       fdisk_info(cxt, _("Adding logical partition %zu"),
-                       cxt->label->nparts_max);
+       /* this message makes sense only when we use extended/primary/logical
+        * dialog. The dialog is disable for scripts, see dos_add_partition() */
+       if (!cxt->script)
+               fdisk_info(cxt, _("Adding logical partition %zu"),
+                               cxt->label->nparts_max);
        *partno = cxt->label->nparts_max - 1;
        return add_partition(cxt, *partno, pa);
 }