]> git.pld-linux.org Git - packages/parted.git/blob - 0073-libpartd-dasd-improve-flag-processing-for-DASD-LDL.patch
- rel 4; tons of patches from FC
[packages/parted.git] / 0073-libpartd-dasd-improve-flag-processing-for-DASD-LDL.patch
1 From fb8167365502c7476d571fb279889ad2c6c2785e Mon Sep 17 00:00:00 2001
2 From: Wang Dong <dongdwdw@linux.vnet.ibm.com>
3 Date: Fri, 24 Mar 2017 03:11:12 +0100
4 Subject: [PATCH 73/75] libpartd/dasd: improve flag processing for DASD-LDL
5
6 DASD-LDL does not support flag now, so all the flags are
7 unavailable to it.
8
9 Signed-off-by: Andre Wild <wild@linux.vnet.ibm.com>
10 Signed-off-by: Wang Dong <dongdwdw@linux.vnet.ibm.com>
11 Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
12 ---
13  libparted/labels/dasd.c | 14 ++++++++++++++
14  1 file changed, 14 insertions(+)
15
16 diff --git a/libparted/labels/dasd.c b/libparted/labels/dasd.c
17 index 7594e96..e246ecb 100644
18 --- a/libparted/labels/dasd.c
19 +++ b/libparted/labels/dasd.c
20 @@ -773,10 +773,24 @@ dasd_partition_get_flag (const PedPartition* part, PedPartitionFlag flag)
21         }
22  }
23  
24 +/*
25 + * The DASD-LDL does not support flags now.
26 + * So just return 0.
27 +*/
28  static int
29  dasd_partition_is_flag_available (const PedPartition* part,
30                                    PedPartitionFlag flag)
31  {
32 +       DasdDiskSpecific* disk_specific;
33 +       PED_ASSERT (part != NULL);
34 +       PED_ASSERT (part->disk != NULL);
35 +       PED_ASSERT (part->disk->disk_specific != NULL);
36 +
37 +       disk_specific = part->disk->disk_specific;
38 +
39 +       if (disk_specific->format_type == 1)
40 +               return 0;
41 +
42         switch (flag) {
43                 case PED_PARTITION_RAID:
44                         return 1;
45 -- 
46 2.9.3
47
This page took 0.062545 seconds and 3 git commands to generate.