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