The partition table of DASD-LDL device with the dasd disk label should not be changed according to its character in Linux. When the user tries to modify the partition table, an exception will be raised to inform user of this character.
Signed-off-by: Wang Dong <[email protected]> Signed-off-by: Hendrik Brueckner <[email protected]> --- libparted/labels/dasd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libparted/labels/dasd.c b/libparted/labels/dasd.c index 7594e96..ed0c82a 100644 --- a/libparted/labels/dasd.c +++ b/libparted/labels/dasd.c @@ -619,8 +619,12 @@ dasd_write (const PedDisk* disk) PDEBUG; /* If not formated in CDL, don't write anything. */ - if (disk_specific->format_type == 1) + if (disk_specific->format_type == 1) { + ped_exception_throw (PED_EXCEPTION_ERROR, + PED_EXCEPTION_CANCEL, + _("The partition table of DASD-LDL device cannot be changed.\n")); return 1; + } /* initialize the anchor */ fdasd_initialize_anchor(&anchor); -- 2.8.4

