92 lines
2.5 KiB
Diff
92 lines
2.5 KiB
Diff
|
--- parted-1.8.6/libparted/labels/sun.c.pix 2007-03-13 18:01:09.000000000 +0100
|
||
|
+++ parted-1.8.6/libparted/labels/sun.c 2007-04-20 11:07:10.000000000 +0200
|
||
|
@@ -86,6 +86,7 @@
|
||
|
int is_boot;
|
||
|
int is_root;
|
||
|
int is_lvm;
|
||
|
+ int is_raid;
|
||
|
};
|
||
|
|
||
|
struct _SunDiskData {
|
||
|
@@ -344,6 +345,7 @@
|
||
|
sun_data->type = label->infos[i].id;
|
||
|
sun_data->is_boot = sun_data->type == 0x1;
|
||
|
sun_data->is_root = sun_data->type == 0x2;
|
||
|
+ sun_data->is_raid = sun_data->type == 0xfd;
|
||
|
sun_data->is_lvm = sun_data->type == 0x8e;
|
||
|
|
||
|
part->num = i + 1;
|
||
|
@@ -479,6 +481,7 @@
|
||
|
sun_data->type = 0;
|
||
|
sun_data->is_boot = 0;
|
||
|
sun_data->is_root = 0;
|
||
|
+ sun_data->is_raid = 0;
|
||
|
sun_data->is_lvm = 0;
|
||
|
} else {
|
||
|
part->disk_specific = NULL;
|
||
|
@@ -512,6 +515,7 @@
|
||
|
new_sun_data->type = old_sun_data->type;
|
||
|
new_sun_data->is_boot = old_sun_data->is_boot;
|
||
|
new_sun_data->is_root = old_sun_data->is_root;
|
||
|
+ new_sun_data->is_raid = old_sun_data->is_raid;
|
||
|
new_sun_data->is_lvm = old_sun_data->is_lvm;
|
||
|
return new_part;
|
||
|
}
|
||
|
@@ -542,6 +546,10 @@
|
||
|
return 1;
|
||
|
}
|
||
|
if (sun_data->is_lvm) {
|
||
|
+ sun_data->type = 0xfd;
|
||
|
+ return 1;
|
||
|
+ }
|
||
|
+ if (sun_data->is_lvm) {
|
||
|
sun_data->type = 0x8e;
|
||
|
return 1;
|
||
|
}
|
||
|
@@ -572,19 +580,25 @@
|
||
|
case PED_PARTITION_BOOT:
|
||
|
sun_data->is_boot = state;
|
||
|
if (state)
|
||
|
- sun_data->is_root = sun_data->is_lvm = 0;
|
||
|
+ sun_data->is_root = sun_data->is_raid = sun_data->is_lvm = 0;
|
||
|
return ped_partition_set_system (part, part->fs_type);
|
||
|
|
||
|
case PED_PARTITION_ROOT:
|
||
|
sun_data->is_root = state;
|
||
|
if (state)
|
||
|
- sun_data->is_boot = sun_data->is_lvm = 0;
|
||
|
+ sun_data->is_boot = sun_data->is_raid = sun_data->is_lvm = 0;
|
||
|
+ return ped_partition_set_system (part, part->fs_type);
|
||
|
+
|
||
|
+ case PED_PARTITION_RAID:
|
||
|
+ sun_data->is_raid = state;
|
||
|
+ if (state)
|
||
|
+ sun_data->is_root = sun_data->is_boot = sun_data->is_lvm = 0;
|
||
|
return ped_partition_set_system (part, part->fs_type);
|
||
|
|
||
|
case PED_PARTITION_LVM:
|
||
|
sun_data->is_lvm = state;
|
||
|
if (state)
|
||
|
- sun_data->is_root = sun_data->is_boot = 0;
|
||
|
+ sun_data->is_root = sun_data->is_boot = sun_data->is_raid = 0;
|
||
|
return ped_partition_set_system (part, part->fs_type);
|
||
|
|
||
|
default:
|
||
|
@@ -608,6 +622,8 @@
|
||
|
return sun_data->is_boot;
|
||
|
case PED_PARTITION_ROOT:
|
||
|
return sun_data->is_root;
|
||
|
+ case PED_PARTITION_RAID:
|
||
|
+ return sun_data->is_raid;
|
||
|
case PED_PARTITION_LVM:
|
||
|
return sun_data->is_lvm;
|
||
|
|
||
|
@@ -625,6 +641,7 @@
|
||
|
case PED_PARTITION_BOOT:
|
||
|
case PED_PARTITION_ROOT:
|
||
|
case PED_PARTITION_LVM:
|
||
|
+ case PED_PARTITION_RAID:
|
||
|
return 1;
|
||
|
|
||
|
default:
|