Bug#248676: [patch] Detection of LVM and RAID partitions
Package: partconf
Version: svn
Followup-For: Bug #248676
With this patch find-partitions will detect LVM and RAID partitions
first (using patition type), then it will detect filesystem type.
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.4.26
Locale: LANG=uk_UA, LC_CTYPE=uk_UA
Index: find-parts.c
===================================================================
--- find-parts.c (revision 15344)
+++ find-parts.c (working copy)
@@ -147,20 +147,17 @@
{
if (PART_SIZE_BYTES(dev, part) > 0)
p->size = PART_SIZE_BYTES(dev, part);
- if (part->fs_type != NULL) {
+ if (ped_partition_is_flag_available(part, PED_PARTITION_LVM) &&
+ ped_partition_get_flag(part, PED_PARTITION_LVM)) {
+ p->fstype = strdup("LVM");
+ } else if (ped_partition_is_flag_available(part, PED_PARTITION_RAID) &&
+ ped_partition_get_flag(part, PED_PARTITION_RAID)) {
+ p->fstype = strdup("RAID");
+ } else if (part->fs_type != NULL) {
if (strcmp(part->fs_type->name, "linux-swap") == 0)
p->fstype = strdup("swap");
else
p->fstype = strdup(part->fs_type->name);
- } else {
- if (ped_partition_is_flag_available(part, PED_PARTITION_LVM) &&
- ped_partition_get_flag(part, PED_PARTITION_LVM)) {
- p->fstype = strdup("LVM");
- }
- if (ped_partition_is_flag_available(part, PED_PARTITION_RAID) &&
- ped_partition_get_flag(part, PED_PARTITION_RAID)) {
- p->fstype = strdup("RAID");
- }
}
}
Reply to: