sparc RAID support
This commit is contained in:
parent
2e1dd1c100
commit
acd933ac89
108
parted-1.8.8-sparc-enableraid.patch
Normal file
108
parted-1.8.8-sparc-enableraid.patch
Normal file
@ -0,0 +1,108 @@
|
||||
diff -up parted-1.8.8/libparted/labels/sun.c.enableraid parted-1.8.8/libparted/labels/sun.c
|
||||
--- parted-1.8.8/libparted/labels/sun.c.enableraid 2008-12-13 11:52:42.000000000 -0500
|
||||
+++ parted-1.8.8/libparted/labels/sun.c 2008-12-13 11:57:27.000000000 -0500
|
||||
@@ -85,6 +85,7 @@ struct _SunPartitionData {
|
||||
int is_boot;
|
||||
int is_root;
|
||||
int is_lvm;
|
||||
+ int is_raid;
|
||||
};
|
||||
|
||||
struct _SunDiskData {
|
||||
@@ -344,6 +345,7 @@ sun_read (PedDisk* disk)
|
||||
sun_data->is_boot = sun_data->type == 0x1;
|
||||
sun_data->is_root = sun_data->type == 0x2;
|
||||
sun_data->is_lvm = sun_data->type == 0x8e;
|
||||
+ sun_data->is_raid = sun_data->type == 0xfd;
|
||||
|
||||
part->num = i + 1;
|
||||
part->fs_type = ped_file_system_probe (&part->geom);
|
||||
@@ -479,6 +481,7 @@ sun_partition_new (const PedDisk* disk,
|
||||
sun_data->is_boot = 0;
|
||||
sun_data->is_root = 0;
|
||||
sun_data->is_lvm = 0;
|
||||
+ sun_data->is_raid = 0;
|
||||
} else {
|
||||
part->disk_specific = NULL;
|
||||
}
|
||||
@@ -512,6 +515,7 @@ sun_partition_duplicate (const PedPartit
|
||||
new_sun_data->is_boot = old_sun_data->is_boot;
|
||||
new_sun_data->is_root = old_sun_data->is_root;
|
||||
new_sun_data->is_lvm = old_sun_data->is_lvm;
|
||||
+ new_sun_data->is_raid = old_sun_data->is_raid;
|
||||
return new_part;
|
||||
}
|
||||
|
||||
@@ -544,6 +548,10 @@ sun_partition_set_system (PedPartition*
|
||||
sun_data->type = 0x8e;
|
||||
return 1;
|
||||
}
|
||||
+ if (sun_data->is_raid) {
|
||||
+ sun_data->type = 0xfd;
|
||||
+ return 1;
|
||||
+ }
|
||||
|
||||
sun_data->type = 0x83;
|
||||
if (fs_type) {
|
||||
@@ -570,20 +578,38 @@ sun_partition_set_flag (PedPartition* pa
|
||||
switch (flag) {
|
||||
case PED_PARTITION_BOOT:
|
||||
sun_data->is_boot = state;
|
||||
- if (state)
|
||||
- sun_data->is_root = sun_data->is_lvm = 0;
|
||||
+ if (state) {
|
||||
+ sun_data->is_lvm = 0;
|
||||
+ sun_data->is_raid = 0
|
||||
+ sun_data->is_root = 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;
|
||||
+ if (state) {
|
||||
+ sun_data->is_boot = 0;
|
||||
+ sun_data->is_lvm = 0;
|
||||
+ sun_data->is_raid = 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;
|
||||
+ if (state) {
|
||||
+ sun_data->is_boot = 0;
|
||||
+ sun_data->is_raid = 0;
|
||||
+ sun_data->is_root = 0;
|
||||
+ }
|
||||
+ return ped_partition_set_system (part, part->fs_type);
|
||||
+
|
||||
+ case PED_PARTITION_RAID:
|
||||
+ sun_data->is_raid = state;
|
||||
+ if (state) {
|
||||
+ sun_data->is_boot = 0;
|
||||
+ sun_data->is_lvm = 0;
|
||||
+ sun_data->is_root = 0;
|
||||
+ }
|
||||
return ped_partition_set_system (part, part->fs_type);
|
||||
|
||||
default:
|
||||
@@ -609,6 +635,8 @@ sun_partition_get_flag (const PedPartiti
|
||||
return sun_data->is_root;
|
||||
case PED_PARTITION_LVM:
|
||||
return sun_data->is_lvm;
|
||||
+ case PED_PARTITION_RAID:
|
||||
+ return sun_data->is_raid;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
@@ -624,6 +652,7 @@ sun_partition_is_flag_available (const P
|
||||
case PED_PARTITION_BOOT:
|
||||
case PED_PARTITION_ROOT:
|
||||
case PED_PARTITION_LVM:
|
||||
+ case PED_PARTITION_RAID:
|
||||
return 1;
|
||||
|
||||
default:
|
@ -4,7 +4,7 @@
|
||||
Summary: The GNU disk partition manipulation program
|
||||
Name: parted
|
||||
Version: 1.8.8
|
||||
Release: 9%{?dist}
|
||||
Release: 10%{?dist}
|
||||
License: GPLv3+
|
||||
Group: Applications/System
|
||||
URL: http://www.gnu.org/software/parted
|
||||
@ -20,6 +20,7 @@ Patch6: %{name}-1.8.8-alpha.patch
|
||||
Patch7: %{name}-1.8.8-dospartrec.patch
|
||||
Patch8: %{name}-1.8.8-appletv.patch
|
||||
Patch9: %{name}-1.8.8-s390-compile.patch
|
||||
Patch10: %{name}-1.8.8-sparc-enableraid.patch
|
||||
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: e2fsprogs-devel
|
||||
@ -66,6 +67,7 @@ Parted library, you need to install this package.
|
||||
%patch7 -p1 -b .dospartrec
|
||||
%patch8 -p1 -b .appletv
|
||||
%patch9 -p1 -b .s390-compile
|
||||
%patch10 -p1 -b .sparc-raid
|
||||
|
||||
%build
|
||||
%configure --enable-device-mapper --enable-selinux --disable-static
|
||||
@ -123,6 +125,9 @@ fi
|
||||
%{_exec_prefix}/%{_lib}/pkgconfig/libparted.pc
|
||||
|
||||
%changelog
|
||||
* Sat Dec 13 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.8.8-10
|
||||
- enable RAID partition types on sun disklabels for sparc
|
||||
|
||||
* Thu Nov 06 2008 Joel Granados <jgranado@redhat.com> - 1.8.8-9
|
||||
- Fix the build for the s390(x) archs (#470211).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user