[Parted-commits] GNU Parted Official Repository: Changes to 'next'
Jim Meyering
meyering at alioth.debian.org
Fri Oct 23 20:11:28 UTC 2009
New branch 'next' available with the following commits:
commit 1cb1f190f9b3a52e628087957db79645a7d8e7e9
Author: Jim Meyering <meyering at redhat.com>
Date: Fri Oct 23 16:32:20 2009 +0200
gpt: header validity: also consider whether a PE array crc matches
* libparted/labels/gpt.c (check_PE_array_CRC): New function.
(_header_is_valid): Use it to verify that partition entry array
checksums match, too.
Karel Zak noticed that this check was not being performed.
* tests/t0280-gpt-corrupt.sh: Adapt to changed diagnostic.
commit 69efb50c5b5a0e6aa2f7ead6383c2cbaaae38812
Author: Jim Meyering <meyering at redhat.com>
Date: Fri Oct 23 16:15:19 2009 +0200
gpt: tweak interfaces to pass disk, not disk->dev
* libparted/labels/gpt.c: required for upcoming CRC-checking function.
commit e3b44c6c0ebd639ff65f90e622d06c49b629c750
Author: Jim Meyering <meyering at redhat.com>
Date: Fri Oct 23 12:48:11 2009 +0200
gpt: don't ignore an improbable (1-in-2^32) failure
pth_crc32 mapped failure to a crc32 value of 0. If that happened
to match the stored value, there would be no indication that there
had been a malloc failure.
* libparted/labels/gpt.c (pth_crc32): Change interface so we can
distinguish failure from a CRC value of 0.
Update all callers.
(_generate_header): Now that we recognize pth_crc32 can fail,
we must admit that its void-returning caller _generate_header
may fail, too. Return "int" and adjust *its* callers.
commit cb16661ea7fb2696ba33e630365df8a7bed2d479
Author: Jim Meyering <meyering at redhat.com>
Date: Thu Oct 22 22:14:03 2009 +0200
gpt: factor out code that is about to be reused
* libparted/labels/gpt.c: Include <errno.h>.
(gpt_read_PE_array): New function, ...
(gpt_read): ...factored out of this one. Use it.
commit 4cd245937c8b8287133d82d6e48cecd6459873d3
Author: Jim Meyering <meyering at redhat.com>
Date: Thu Oct 22 21:46:00 2009 +0200
gpt: don't dereference NULL upon OOM (pth_get_raw callers)
Handle each case in which pth_get_raw may return NULL.
* libparted/labels/gpt.c (pth_get_raw): Upon OOM error, return 0
rather than dereferencing NULL.
(gpt_write): Don't dereference NULL upon OOM error.
(gpt_read): Yet another.
commit e34b263f5504de3f6c518fc3ece99957d5e81f68
Author: Jim Meyering <meyering at redhat.com>
Date: Thu Oct 22 21:34:48 2009 +0200
gpt: don't dereference NULL upon OOM (in pth_get_raw)
* libparted/labels/gpt.c (pth_get_raw): Don't dereference NULL
on out of memory error.
commit a55db4f3741a1042026f23bfd2221483690ce2cd
Author: Jim Meyering <meyering at redhat.com>
Date: Thu Oct 22 21:26:26 2009 +0200
gpt: remove dead store
* libparted/labels/gpt.c (pth_crc32): Remove useless initialization.
commit 0d11f1f4c92adb4c8768dd2573a9316894ca61f3
Author: Jim Meyering <meyering at redhat.com>
Date: Thu Oct 22 20:55:39 2009 +0200
gpt: make an internal function "const"-correct
* libparted/labels/gpt.c (_parse_header): Make "gpt" const.
commit ea795d89eb48e1e560367486213b13a2c5bc1d42
Author: Jim Meyering <meyering at redhat.com>
Date: Thu Oct 22 20:18:48 2009 +0200
tests: convert t0280 to new test style.
* tests/t0280-gpt-corrupt.sh: Convert to new test style.
* tests/t-lib.sh: Source t-local.sh.
* tests/t-local.sh: New file.
commit 0b4750684183696528dd628566031f0c896b4ca7
Author: Jim Meyering <meyering at redhat.com>
Date: Thu Oct 22 18:08:57 2009 +0200
gpt: clean up
* libparted/labels/gpt.c (gpt_probe): Remove now-useless test before
pth_free.
(gpt_read): Use ptt_clear_sectors in place of open-coded equivalent.
* cfg.mk (useless_free_options): Add --name=pth_free.
commit 03ab3c0fb5345609eb02f3084a79622d348341c0
Author: Jim Meyering <meyering at redhat.com>
Date: Thu Oct 22 11:35:44 2009 +0200
gpt: make its header check a tiny bit more strict
* libparted/labels/gpt.c (_header_is_valid): Declare a header
to be invalid if its AlternateLBA is the same as MyLBA.
2009-10-21 Jim Meyering <meyering at redhat.com>
complete most of gpt-CRC-related rewrite
* libparted/labels/gpt.c (_read_header): Remove now-unused function.
commit 3fd436cbf7d7b677278e8c4ec13b87fd0c5d7e3f
Author: Jim Meyering <meyering at redhat.com>
Date: Wed Oct 21 18:21:07 2009 +0200
t0280-gpt-corrupt.sh: adapt for new output, improve test
commit 7f753b1b0505b7e791bb8fb9cbdf38187b5f91a3
Author: Jim Meyering <meyering at redhat.com>
Date: Wed Oct 21 13:33:20 2009 +0200
gpt: rewrite GPT header-reading code
* libparted/labels/gpt.c (read_header): Remove now-unused function.
(gpt_read_headers): New function.
(gpt_read): Rewrite to use gpt_read_headers.
commit 35b0bb946d09d1c6be7c51ba74f3bfd602425e85
Author: Jim Meyering <meyering at redhat.com>
Date: Mon Oct 19 20:14:44 2009 +0200
gpt: require that the backup table's AlternateLBA is 1
* libparted/labels/gpt.c (_header_is_valid): When checking
the backup header, ensure that its AlternateLBA is 1.
commit 9278f224bad8c6adac6a241723f9d71e2d0ba589
Author: Jim Meyering <meyering at redhat.com>
Date: Mon Oct 19 20:12:41 2009 +0200
tests: gpt: test for detection of corrupt backup partition header
* tests/t0280-gpt-corrupt.sh: Corrupt the backup partition header's
MyLBA, and require that an attempt to print the table fails.
commit f3e3e9a5c702c5b2254f6246fd466e309e60d6ba
Author: Jim Meyering <meyering at redhat.com>
Date: Mon Oct 19 18:55:06 2009 +0200
tests: hook up new GPT-crc-corrupting script
* tests/Makefile.am (TESTS): Add t0280-gpt-corrupt.sh.
* libparted/labels/gpt.c (gpt_read): Change diagnostic to say that
the PTE CRC mismatch is in the primary table.
* tests/t0280-gpt-corrupt.sh: Tweak diagnostic to match
what the code now prints.
commit 03eec0d9a41f67425fc2c83e7f77abb4b37b95ae
Author: Jim Meyering <meyering at redhat.com>
Date: Mon Oct 19 18:47:00 2009 +0200
gpt: also verify MyLBA when checking table validity
* libparted/labels/gpt.c (_header_is_valid): Add parameter, my_lba.
(_read_header): Update caller.
(_parse_header): Comment out this use of _header_is_valid
in an assertion.
commit 3c55c9b24e6c4136aed2cf6cd1f6f193e80cae3c
Author: Jim Meyering <meyering at redhat.com>
Date: Mon Oct 19 18:03:46 2009 +0200
gpt: clean up formatting of static initializers
* libparted/labels/gpt.c (NULL_IF_DISCOVER_ONLY): Define.
(gpt_disk_ops): Use it to avoid in-decl #if directives.
commit 8c67699b9c9ee70f4969e0ac0479a5c604d9289d
Author: Jim Meyering <meyering at redhat.com>
Date: Mon Oct 19 17:34:19 2009 +0200
gpt.c: filter through indent --no-tabs...
and manual fix-up to shorten long lines.
Also, manually format the static initializers in e.g., gpt_disk_ops,
since GNU indent botches that.
More information about the Parted-commits
mailing list