[parted-devel] [PATCH] libparted/dasd: Fix printing flags 'raid' and 'lvm'
Sebastian Parschauer
sparschauer at suse.de
Mon May 22 15:22:59 UTC 2017
The flags 'raid' and 'lvm' are not printed for DASD CDL partitions
but fdasd shows that they are set. In the function dasd_read(),
the return value of ped_file_system_probe() is checked for NULL
before setting the flags. This is wrong as we want a file system
type to be set. So check for not NULL instead.
Fixes: c8873b0044c8 ("When reading the DASD disk label, ...")
Signed-off-by: Sebastian Parschauer <sparschauer at suse.de>
---
libparted/labels/dasd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libparted/labels/dasd.c b/libparted/labels/dasd.c
index 632ec8e42e40..0656d3598a41 100644
--- a/libparted/labels/dasd.c
+++ b/libparted/labels/dasd.c
@@ -448,13 +448,13 @@ dasd_read (PedDisk* disk)
dasd_data = part->disk_specific;
if ((strncmp(PART_TYPE_RAID, str, 6) == 0) &&
- (ped_file_system_probe(&part->geom) == NULL))
+ (ped_file_system_probe(&part->geom) != NULL))
ped_partition_set_flag(part, PED_PARTITION_RAID, 1);
else
ped_partition_set_flag(part, PED_PARTITION_RAID, 0);
if ((strncmp(PART_TYPE_LVM, str, 6) == 0) &&
- (ped_file_system_probe(&part->geom) == NULL))
+ (ped_file_system_probe(&part->geom) != NULL))
ped_partition_set_flag(part, PED_PARTITION_LVM, 1);
else
ped_partition_set_flag(part, PED_PARTITION_LVM, 0);
--
2.12.0
More information about the parted-devel
mailing list