Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 290596 Details for
Bug 427114
parted does not allow RAID or LVM types in BSD partitioned disks
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
allow RAID or LVM type partitions on BSD partitioned disk
parted-1.8.6-alpha.patch (text/plain), 2.65 KB, created by
Jay Estabrook
on 2007-12-31 22:58:19 UTC
(
hide
)
Description:
allow RAID or LVM type partitions on BSD partitioned disk
Filename:
MIME Type:
Creator:
Jay Estabrook
Created:
2007-12-31 22:58:19 UTC
Size:
2.65 KB
patch
obsolete
>diff -up parted-1.8.6/libparted/labels/bsd.c.alpha parted-1.8.6/libparted/labels/bsd.c >--- parted-1.8.6/libparted/labels/bsd.c.alpha 2007-03-13 18:01:09.000000000 +0100 >+++ parted-1.8.6/libparted/labels/bsd.c 2007-11-06 21:34:08.000000000 +0100 >@@ -109,6 +109,9 @@ typedef struct { > > typedef struct { > uint8_t type; >+ int boot; >+ int raid; >+ int lvm; > } BSDPartitionData; > > static PedDiskType bsd_disk_type; >@@ -390,6 +393,9 @@ bsd_partition_new (const PedDisk* disk, > if (!bsd_data) > goto error_free_part; > bsd_data->type = 0; >+ bsd_data->boot = 0; >+ bsd_data->raid = 0; >+ bsd_data->lvm = 0; > } else { > part->disk_specific = NULL; > } >@@ -419,6 +425,9 @@ bsd_partition_duplicate (const PedPartit > old_bsd_data = (BSDPartitionData*) part->disk_specific; > new_bsd_data = (BSDPartitionData*) new_part->disk_specific; > new_bsd_data->type = old_bsd_data->type; >+ new_bsd_data->boot = old_bsd_data->boot; >+ new_bsd_data->raid = old_bsd_data->raid; >+ new_bsd_data->lvm = old_bsd_data->lvm; > return new_part; > } > >@@ -452,14 +461,61 @@ bsd_partition_set_system (PedPartition* > static int > bsd_partition_set_flag (PedPartition* part, PedPartitionFlag flag, int state) > { >- /* no flags for bsd */ >+ PedDisk* disk; >+// PedPartition* walk; // since -Werror, this unused variable would break build >+ BSDPartitionData* bsd_data; >+ >+ PED_ASSERT (part != NULL, return 0); >+ PED_ASSERT (part->disk_specific != NULL, return 0); >+ PED_ASSERT (part->disk != NULL, return 0); >+ >+ bsd_data = part->disk_specific; >+ disk = part->disk; >+ >+ switch (flag) { >+ case PED_PARTITION_BOOT: >+ bsd_data->boot = state; >+ return 1; >+ case PED_PARTITION_RAID: >+ if (state) { >+ bsd_data->lvm = 0; >+ } >+ bsd_data->raid = state; >+ return 1; >+ case PED_PARTITION_LVM: >+ if (state) { >+ bsd_data->raid = 0; >+ } >+ bsd_data->lvm = state; >+ return 1; >+ default: >+ ; >+ } > return 0; > } > > static int > bsd_partition_get_flag (const PedPartition* part, PedPartitionFlag flag) > { >- /* no flags for bsd */ >+ BSDPartitionData* bsd_data; >+ >+ PED_ASSERT (part != NULL, return 0); >+ PED_ASSERT (part->disk_specific != NULL, return 0); >+ >+ bsd_data = part->disk_specific; >+ switch (flag) { >+ case PED_PARTITION_BOOT: >+ return bsd_data->boot; >+ >+ case PED_PARTITION_RAID: >+ return bsd_data->raid; >+ >+ case PED_PARTITION_LVM: >+ return bsd_data->lvm; >+ >+ default: >+ ; >+ } > return 0; > } > >@@ -467,7 +522,14 @@ static int > bsd_partition_is_flag_available (const PedPartition* part, > PedPartitionFlag flag) > { >- /* no flags for bsd */ >+ switch (flag) { >+ case PED_PARTITION_BOOT: >+ case PED_PARTITION_RAID: >+ case PED_PARTITION_LVM: >+ return 1; >+ default: >+ ; >+ } > return 0; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 427114
: 290596