Re: GPT: don't misbehave with e.g., a 9-entry partition

2011-11-03 Thread Seth Goldberg
Thanks! Looks good to me. --S Quoting Jim Meyering, who wrote the following on Thu, 3 Nov 2011: Just over a year ago, Robert Herndon reported that parted would fail to read partition tables with say, 9 partition array entries instead of the usual 128: http://thread.gmane.org/gmane.comp

[PATCH 4/4] tests: exercise the "GPT vs other-sized partition entry arrays" fixes

2011-11-03 Thread Jim Meyering
From: Jim Meyering * tests/t0210-gpt-resized-partition-entry-array.sh: New file. * tests/Makefile.am (TESTS): Add it. --- tests/Makefile.am|1 + tests/t0210-gpt-resized-partition-entry-array.sh | 38 ++ 2 files changed, 39 insertions(+),

GPT: don't misbehave with e.g., a 9-entry partition

2011-11-03 Thread Jim Meyering
Just over a year ago, Robert Herndon reported that parted would fail to read partition tables with say, 9 partition array entries instead of the usual 128: http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10173/ His proposed solution used in 1/4 turned out to be the best way I could see to

[PATCH 2/4] gpt: don't misbehave with e.g., a 9-entry partition array

2011-11-03 Thread Jim Meyering
From: Jim Meyering * libparted/labels/gpt.c (_generate_header): Correct size of partition array entries to round up to nearest multiple of sector size, so that we set gpt->PartitionEntryLBA correctly also when the number of partition entries is not a multiple of sector_size / 128. Problem diagno

[PATCH 3/4] tests: rewrite/complete GPT-munging perl script

2011-11-03 Thread Jim Meyering
From: Jim Meyering Rewrite and complete this script. It was incomplete and buggy. Now it works. * tests/gpt-header-munge: Rename from ... * tests/perl-munge-9-PTE-table: ...this. --- tests/gpt-header-munge | 279 ++ tests/perl-munge-9-PTE-table |

[PATCH 1/4] gpt: prepare for tables with n_partition_array_entries != 128

2011-11-03 Thread Jim Meyering
From: Robert Herndon * libparted/labels/gpt.c (gpt_read_PE_array): When computing the size of the partition array entry, use the value of "number of partition array entries" read from a GPT header, not the default of 128 that we use when creating new headers. Details here: http://thread.gmane.or

[PATCH] parted: exit nonzero for certain failures already diagnosed as "Error"

2011-11-03 Thread Jim Meyering
While working on a different GPT-related problem, I was surprised to see an "Error: ...", yet to see that parted exited successfully. This fixes that: >From f0e91a88107642b17f1c7801d9326460924a1948 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 3 Nov 2011 17:57:19 +0100 Subject: [PATCH]

[PATCH] tests: adjust a test to make its failure easier to diagnose

2011-11-03 Thread Jim Meyering
Not seeing the contents of "err" made this too hard to diagnose when the test failed, so... >From e284640cc665843d8bdb35cb452a28ceb62591e0 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 3 Nov 2011 16:59:07 +0100 Subject: [PATCH] tests: adjust a test to make its failure easier to diagnose