]> git.pld-linux.org Git - packages/parted.git/blame - 0074-libparted-dasd-add-an-exception-for-changing-DASD-LD.patch
- release 5
[packages/parted.git] / 0074-libparted-dasd-add-an-exception-for-changing-DASD-LD.patch
CommitLineData
c886eb9d
AM
1From c6ada23e466d824efcaff699a3de2923895c2244 Mon Sep 17 00:00:00 2001
2From: Wang Dong <dongdwdw@linux.vnet.ibm.com>
3Date: Fri, 24 Mar 2017 11:20:09 +0100
4Subject: [PATCH 74/75] libparted/dasd: add an exception for changing DASD-LDL
5 partition table
6
7The partition table of DASD-LDL device with the dasd disk label
8should not be changed according to its character in Linux.
9When the user tries to modify the partition table, an exception
10will be raised to inform user of this character.
11
12Signed-off-by: Wang Dong <dongdwdw@linux.vnet.ibm.com>
13Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
14---
15 libparted/labels/dasd.c | 6 +++++-
16 1 file changed, 5 insertions(+), 1 deletion(-)
17
18diff --git a/libparted/labels/dasd.c b/libparted/labels/dasd.c
19index e246ecb..632ec8e 100644
20--- a/libparted/labels/dasd.c
21+++ b/libparted/labels/dasd.c
22@@ -619,8 +619,12 @@ dasd_write (const PedDisk* disk)
23 PDEBUG;
24
25 /* If not formated in CDL, don't write anything. */
26- if (disk_specific->format_type == 1)
27+ if (disk_specific->format_type == 1) {
28+ ped_exception_throw (PED_EXCEPTION_ERROR,
29+ PED_EXCEPTION_CANCEL,
30+ _("The partition table of DASD-LDL device cannot be changed.\n"));
31 return 1;
32+ }
33
34 /* initialize the anchor */
35 fdasd_initialize_anchor(&anchor);
36--
372.9.3
38
This page took 0.598504 seconds and 4 git commands to generate.