aboutsummaryrefslogtreecommitdiffstats
path: root/disk-utils/fdisk-menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'disk-utils/fdisk-menu.c')
-rw-r--r--disk-utils/fdisk-menu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/disk-utils/fdisk-menu.c b/disk-utils/fdisk-menu.c
index 71355f6848..51ae7b5e6e 100644
--- a/disk-utils/fdisk-menu.c
+++ b/disk-utils/fdisk-menu.c
@@ -279,7 +279,7 @@ static const struct menu_entry *next_menu_entry(
/* no more entries */
if (e->title == NULL ||
/* menu wanted for specified labels only */
- (m->label && lb && !(m->label & type)) ||
+ (m->label && (!lb || !(m->label & type))) ||
/* unwanted for nested PT */
(m->nonested && parent) ||
/* menu excluded for specified labels */
@@ -296,7 +296,7 @@ static const struct menu_entry *next_menu_entry(
/* excluded for the current label */
if ((e->exclude && lb && e->exclude & type) ||
/* entry wanted for specified labels only */
- (e->label && lb && !(e->label & type)) ||
+ (e->label && (!lb || !(e->label & type))) ||
/* exclude non-expert entries in expect mode */
(e->expert == 0 && fdisk_is_details(cxt)) ||
/* nested only */