Hi, ...
After seeing strange breakage in debian-installer with mac partition tables,
and investigating, i found out that the parted.c:do_print function was doing
real bogus stuff when there where no extended partitions but the labels had
name support. This caused "primary" to be used for metadata partitions, and
if there where other partitions, simply not showing up.
The attached patch (against 1.7.1, but applies to 1.8-rc2 also), fixes this.
Friendly,
Sven Luther
#! /bin/sh /usr/share/dpatch/dpatch-run
## parted-print-name.dpatch by Sven Luther <[EMAIL PROTECTED]>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix bug in parted print, when there are no extended partitions, but
partition names.
@DPATCH@
diff -Nur parted-1.7.1-orig/parted/parted.c parted-1.7.1/parted/parted.c
--- parted-1.7.1-orig/parted/parted.c 2006-05-25 19:28:42.000000000 +0200
+++ parted-1.7.1/parted/parted.c 2006-11-01 18:46:38.000000000 +0100
@@ -1196,7 +1196,7 @@
char* start;
char* end;
char* size;
- const char* name;
+ const char* name = "";
char* tmp;
wchar_t* table_rendered;
@@ -1334,16 +1334,18 @@
}
if (!(part->type & PED_PARTITION_FREESPACE)) {
- name = _(ped_partition_type_get_name (part->type));
-
- if (has_extended)
+ if (has_extended) {
+ name = _(ped_partition_type_get_name
(part->type));
str_list_append (row, name);
+ }
str_list_append (row, part->fs_type ?
part->fs_type->name : "");
- if (has_name)
+ if (has_name) {
+ name = _(ped_partition_get_name (part));
str_list_append (row, name);
+ }
str_list_append (row, partition_print_flags (part));
} else {
_______________________________________________
bug-parted mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-parted