parted/libpartd-dasd-improve-flag-processing-for-DASD-LDL.patch
Marcus Meissner 5b97712c80 Accepting request 712877 from home:anicka:branches:Base:System
- port fixes for various bugs from upstream (bsc#1136245)
 - add: libparted-dasd-correct-the-offset-where-the-first-pa.patch
   4126d02, correct the offset where the first partition begins. 
   This patch implements libparted-dasd-do-not-use-first-tracks.patch 
 - remove: libparted-dasd-do-not-use-first-tracks.patch
 - add: parted-fix-crash-due-to-improper-partition-number-in.patch
   149f009, fix crash due to improper partition number input,
   changed call to strtol, use base 0 to fit our parted-type.patch
 - modify: parted-type.patch (removed ui.c part)
 - add: parted-check-the-name-of-partition-first-when-to-nam.patch
   d7a2ff1, check the name of partition first when to name a partition
 - add: libparted-dasd-add-test-cases-for-the-new-fdasd-func.patch 
   c11f5c0, 571e078, add test cases for the new fdasd functions
 - add: libparted-dasd-add-an-exception-for-changing-DASD-LD.patch
   ee2c0c2, add an exception for changing DASD-LDL partition table
 - add: libpartd-dasd-improve-flag-processing-for-DASD-LDL.patch
   1545d6d, improve flag processing for DASD-LDL
 - add: clean-the-disk-information-when-commands-fail-in-int.patch
   5a61f15, clean the disk information when commands fail in 
   interactive mode
 - add: parted-ui-remove-unneccesary-information-of-command.patch
   0b7946a, remove unneccesary information of command line
 - add: parted-fix-wrong-error-label-jump-in-mkpart.patch
   af150f6, fix wrong error label jump in mkpart
 - refresh: libparted-dasd-unify-vtoc-handling-for-cdl-ldl.patch
   4f25d54, unify vtoc handling for cdl/ldl
 - refresh: libparted-dasd-update-and-improve-fdasd-functions.patch
   db37c8c, update and improve fdasd functions
 - refresh: libparted-dasd-add-new-fdasd-functions.patch
   b9e1281, add new fdasd functions

OBS-URL: https://build.opensuse.org/request/show/712877
OBS-URL: https://build.opensuse.org/package/show/Base:System/parted?expand=0&rev=142
2019-07-08 12:12:35 +00:00

45 lines
1.3 KiB
Diff

From 1545d6d4db29fa20f0c611786a094521e8974d4a 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] 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(+)
Index: parted-3.2/libparted/labels/dasd.c
===================================================================
--- parted-3.2.orig/libparted/labels/dasd.c
+++ parted-3.2/libparted/labels/dasd.c
@@ -788,10 +788,24 @@ dasd_partition_get_flag (const PedPartit
}
}
+/*
+ * 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_SWAP:
return 1;