]> git.pld-linux.org Git - packages/parted.git/blob - 0074-libparted-dasd-add-an-exception-for-changing-DASD-LD.patch
- rel 4; tons of patches from FC
[packages/parted.git] / 0074-libparted-dasd-add-an-exception-for-changing-DASD-LD.patch
1 From c6ada23e466d824efcaff699a3de2923895c2244 Mon Sep 17 00:00:00 2001
2 From: Wang Dong <dongdwdw@linux.vnet.ibm.com>
3 Date: Fri, 24 Mar 2017 11:20:09 +0100
4 Subject: [PATCH 74/75] libparted/dasd: add an exception for changing DASD-LDL
5  partition table
6
7 The partition table of DASD-LDL device with the dasd disk label
8 should not be changed according to its character in Linux.
9 When the user tries to modify the partition table, an exception
10 will be raised to inform user of this character.
11
12 Signed-off-by: Wang Dong <dongdwdw@linux.vnet.ibm.com>
13 Signed-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
18 diff --git a/libparted/labels/dasd.c b/libparted/labels/dasd.c
19 index 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 -- 
37 2.9.3
38
This page took 0.079654 seconds and 3 git commands to generate.