#! /bin/sh /usr/share/dpatch/dpatch-run ## parted-print-name.dpatch by Sven Luther ## ## 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 {