|
|
0cb0b9 |
From c6ada23e466d824efcaff699a3de2923895c2244 Mon Sep 17 00:00:00 2001
|
|
|
0cb0b9 |
From: Wang Dong <dongdwdw@linux.vnet.ibm.com>
|
|
|
0cb0b9 |
Date: Fri, 24 Mar 2017 11:20:09 +0100
|
|
|
0cb0b9 |
Subject: [PATCH 74/75] libparted/dasd: add an exception for changing DASD-LDL
|
|
|
0cb0b9 |
partition table
|
|
|
0cb0b9 |
|
|
|
0cb0b9 |
The partition table of DASD-LDL device with the dasd disk label
|
|
|
0cb0b9 |
should not be changed according to its character in Linux.
|
|
|
0cb0b9 |
When the user tries to modify the partition table, an exception
|
|
|
0cb0b9 |
will be raised to inform user of this character.
|
|
|
0cb0b9 |
|
|
|
0cb0b9 |
Signed-off-by: Wang Dong <dongdwdw@linux.vnet.ibm.com>
|
|
|
0cb0b9 |
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
|
|
|
0cb0b9 |
---
|
|
|
0cb0b9 |
libparted/labels/dasd.c | 6 +++++-
|
|
|
0cb0b9 |
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
0cb0b9 |
|
|
|
0cb0b9 |
diff --git a/libparted/labels/dasd.c b/libparted/labels/dasd.c
|
|
|
0cb0b9 |
index e246ecb..632ec8e 100644
|
|
|
0cb0b9 |
--- a/libparted/labels/dasd.c
|
|
|
0cb0b9 |
+++ b/libparted/labels/dasd.c
|
|
|
0cb0b9 |
@@ -619,8 +619,12 @@ dasd_write (const PedDisk* disk)
|
|
|
0cb0b9 |
PDEBUG;
|
|
|
0cb0b9 |
|
|
|
0cb0b9 |
/* If not formated in CDL, don't write anything. */
|
|
|
0cb0b9 |
- if (disk_specific->format_type == 1)
|
|
|
0cb0b9 |
+ if (disk_specific->format_type == 1) {
|
|
|
0cb0b9 |
+ ped_exception_throw (PED_EXCEPTION_ERROR,
|
|
|
0cb0b9 |
+ PED_EXCEPTION_CANCEL,
|
|
|
0cb0b9 |
+ _("The partition table of DASD-LDL device cannot be changed.\n"));
|
|
|
0cb0b9 |
return 1;
|
|
|
0cb0b9 |
+ }
|
|
|
0cb0b9 |
|
|
|
0cb0b9 |
/* initialize the anchor */
|
|
|
0cb0b9 |
fdasd_initialize_anchor(&anchor);
|
|
|
0cb0b9 |
--
|
|
|
0cb0b9 |
2.9.3
|
|
|
0cb0b9 |
|