parted/0073-libpartd-dasd-improve-flag-processing-for-DASD-LDL.patch

48 lines
1.3 KiB
Diff
Raw Normal View History

From fb8167365502c7476d571fb279889ad2c6c2785e Mon Sep 17 00:00:00 2001
From: Wang Dong <dongdwdw@linux.vnet.ibm.com>
Date: Fri, 24 Mar 2017 03:11:12 +0100
Subject: [PATCH 73/75] libpartd/dasd: improve flag processing for DASD-LDL
DASD-LDL does not support flag now, so all the flags are
unavailable to it.
Signed-off-by: Andre Wild <wild@linux.vnet.ibm.com>
Signed-off-by: Wang Dong <dongdwdw@linux.vnet.ibm.com>
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
---
libparted/labels/dasd.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/libparted/labels/dasd.c b/libparted/labels/dasd.c
index 7594e96..e246ecb 100644
--- a/libparted/labels/dasd.c
+++ b/libparted/labels/dasd.c
@@ -773,10 +773,24 @@ dasd_partition_get_flag (const PedPartition* part, PedPartitionFlag flag)
}
}
+/*
+ * The DASD-LDL does not support flags now.
+ * So just return 0.
+*/
static int
dasd_partition_is_flag_available (const PedPartition* part,
PedPartitionFlag flag)
{
+ DasdDiskSpecific* disk_specific;
+ PED_ASSERT (part != NULL);
+ PED_ASSERT (part->disk != NULL);
+ PED_ASSERT (part->disk->disk_specific != NULL);
+
+ disk_specific = part->disk->disk_specific;
+
+ if (disk_specific->format_type == 1)
+ return 0;
+
switch (flag) {
case PED_PARTITION_RAID:
return 1;
--
2.9.3