[Parted-commits] GNU Parted Official Repository: Changes to 'next'

Jim Meyering meyering at alioth.debian.org
Mon Jul 28 16:20:41 UTC 2008


New branch 'next' available with the following commits:
commit 9541765e605da829e46562bc0663d6002e485368
Author: Jim Meyering <meyering at redhat.com>
Date:   Mon Jul 28 18:20:38 2008 +0200

    * README-big-sector: New file.

commit fcb93dc954a7b6402dc69d4c06a0aaf9e169b3f8
Author: Jim Meyering <meyering at redhat.com>
Date:   Mon Jul 28 14:34:46 2008 +0200

    reenabling probe-related code exposed problems with amiga and bsd
    
    * libparted/tests/common.c (_implemented_disk_label): Pretend they're
    not implemented, so we skip them, temporarily.

commit 9750d49cc7da5e128b527de883381512e5e3a898
Author: Jim Meyering <meyering at redhat.com>
Date:   Sat Jul 26 21:16:57 2008 +0200

    tests: re-enable "mac" tests
    
    * libparted/tests/label.c: Remove "mac" exclusion.

commit 7201a6fe79291a3dbd5e4e0d3c38088b9f1bdb1c
Author: Jim Meyering <meyering at redhat.com>
Date:   Sat Jul 26 21:15:05 2008 +0200

    mac clone: avoid failed assertion for sector size > 512
    
    * libparted/labels/mac.c (mac_duplicate): Do not assume that
    the first sector of the partition-map partition is "1".
    
    Running this: cd libparted/tests &&
    PARTED_SECTOR_SIZE=1024 CK_FORK=no valgrind ./label
    would result in a failed assertion:
    
      ped_disk_remove_partition (...) at disk.c:1897
      1897  PED_ASSERT (part->part_list == NULL, goto error);
    
    At first glance, it looked like the free(part) in
    mac_partition_destroy was the culprit.	And removing that free
    does indeed avoid the failed assertion.  However, not only does
    the name "mac_partition_destroy" imply/require the "free", but
    all other *_partition_destroy functions free their PART parameter,
    so removing this free statement cannot be the solution.
    
    Another possibility is that mac_duplicate's use of
    ped_disk_remove_partition is in error.  Removing it appears
    to solve the problem, but I don't know why that code is removing
    the partition-map partition manually, so can't safely remove
    such a thing.
    
    The real problem is that with >512-byte sectors, the "1" in this
    code from mac_duplicate is wrong:
    
      partition_map = ped_disk_get_partition_by_sector (new_disk, 1);
      PED_ASSERT (partition_map != NULL, return 0);
      ped_disk_remove_partition (new_disk, partition_map);
    
    E.g., with 1024-byte sectors, the desired partition-map
    partition starts at sector 2, so the above gets the tiny
    metadata partition in the gap.  Calling ped_disk_remove_partition
    to remove a metadata partition provokes some nasty corruption.
    The desired first-sector number is old_mac_data->ghost_size, not "1".

commit 32e3d878724741a1e6f4145a497c2f7ab62386f8
Author: Jim Meyering <meyering at redhat.com>
Date:   Wed Jul 23 18:54:23 2008 +0200

    * libparted/labels/mac.c (mac_duplicate): Remove dead code.

commit 35be85aab12270dde9a36905cc1999c5030584e9
Author: Jim Meyering <meyering at redhat.com>
Date:   Wed Jul 23 18:05:50 2008 +0200

    mac partitions pass all label+disk tests @1024 & @2048 sector size
    
    * libparted/labels/mac.c (mac_read): Allow for variable sector size.
    (_pad_raw_part): Likewise.
    (get_pme): New convenience function, adapted to work for
    variable sector size and factored out of 4 functions:
    (_generate_raw_part): ...here,
    (_generate_raw_freespace_part): ...here,
    (_generate_empty_part): ...here,
    (_get_first_empty_part_entry): ...and here.

commit 1211d612ff7924510d23c4b8257b0943aabde848
Author: Jim Meyering <meyering at redhat.com>
Date:   Mon Jul 21 22:15:02 2008 +0200

    mac.c (_disk_analyse_ghost_size): allow >512-byte sector size
    
    * libparted/labels/mac.c (_disk_analyse_ghost_size):

commit 766e7a47bab05b48122c49620ccef1a014322543
Author: Jim Meyering <meyering at redhat.com>
Date:   Mon Jul 21 16:27:52 2008 +0200

    mac.c: remove dead code
    
    * libparted/labels/mac.c (mac_partition_new): Remove dead code.
    Return "NULL", not "0".

commit 2f54dab202046759200bf20b89e5027aa15f4d11
Author: Jim Meyering <meyering at redhat.com>
Date:   Mon Jul 21 15:36:18 2008 +0200

    make "mac" partition table support pass the 512-byte ./label tests
    
    * libparted/labels/mac.c (mac_probe, mac_clobber): FIX!

commit f4b10720c34e84947573b0e851d0f88cea0437a3
Author: Jim Meyering <meyering at redhat.com>
Date:   Tue Jul 15 14:47:22 2008 +0200

    factor out the read_sector function
    
    * libparted/labels/pt-tools.c (ptt_read_sector): New function.
    Factored out of...
    * libparted/labels/aix.c (aix_probe, aix_clobber, read_sector):
    * libparted/labels/bsd.c (bsd_probe, bsd_clobber, bsd_read)
    (_probe_and_add_boot_code, read_sector):
    * libparted/labels/dos.c (_, msdos_probe, msdos_clobber)
    (read_table, msdos_write, msdos_disk_type, read_sector):
    * libparted/labels/gpt.c (gpt_probe, gpt_disk_type, read_sector):
    * libparted/labels/loop.c (loop_probe, loop_read, loop_disk_type)
    (read_sector):
    * libparted/labels/mac.c (_, mac_probe, mac_read)
    (write_block_zero, mac_disk_type, read_sector):
    * libparted/labels/pt-tools.h: Declare.

commit d37456e0a03fe7c599d9f652f9028f053108696e
Author: Jim Meyering <meyering at redhat.com>
Date:   Tue Jul 15 12:51:25 2008 +0200

    fix >512-byte sector label/disk-test failure
    
    * libparted/tests/disk.c: Include xstrtol.h.
    (get_sector_size): New function: get sector size from the environment.
    (create_disk): Use the new function to calculate a usable size,
    rather than hard-coding the 512-byte-sector-specific size of 20MB.
    * libparted/tests/common.c (_create_disk): Change meaning (and name)
    of parameter to be size in bytes, not MiB.
    Adjust callers.
    * bootstrap.conf (gnulib_modules): Add xstrtol.
    * po/POTFILES.in: Add lib/xstrtol-error.c.

commit df21fa1a2362268c33663d7e5819072c14ccbe44
Author: Jim Meyering <meyering at redhat.com>
Date:   Mon Jul 14 14:07:58 2008 +0200

    linux.c: also set phys_sector_size.  Must be the same.

commit ea7c763d12984ef5439282f7d8d2ec2a5a8da6f4
Author: Jim Meyering <meyering at redhat.com>
Date:   Mon Jul 14 14:01:13 2008 +0200

    tests: Phew! finally make t5000-tags.sh work with >512-byte sectors
    
    * tests/t5000-tags.sh: Many adjustments, along lines of t0200-gpt.
    Also, be explicit: bios_boot_magic goes in 2nd *sector*.

commit b6e25c4ee625daacac412aa1b3a5a1ec91acc3cd
Author: Jim Meyering <meyering at redhat.com>
Date:   Fri Jul 11 23:41:55 2008 +0200

    Don't hard-code 512 for sector-size.
    
    We'd get the wrong value for dev->length.
    * libparted/arch/linux.c (init_file): In computing dev->length,
    divide by dev->sector_size (not 512) to compute number of sectors.
    Define dev->sector_size earlier.

commit 5391430f9e81849b74e0ffca3cc5cb8d01dca456
Author: Jim Meyering <meyering at redhat.com>
Date:   Fri Jul 11 21:42:58 2008 +0200

    test basic GPT functionality earlier
    
    * tests/t0200-gpt.sh: New file.
    * tests/Makefile.am (TESTS): Add it.

commit 74c305313e59a32474881f31989eccf055bc8a54
Author: Jim Meyering <meyering at redhat.com>
Date:   Fri Jul 11 21:30:05 2008 +0200

    tests: avoid test output mismatch for >512-byte sectors
    
    * tests/test-lib.sh (normalize_part_diag_): New function.
    (sector_size_): New variable.
    * tests/t7000-scripting.sh: Use them.

commit 3aa2948470cda410c1659e77d54a1689c01b814a
Author: Jim Meyering <meyering at redhat.com>
Date:   Fri Jul 11 21:29:42 2008 +0200

    tests: make t5000-tags.sh less sensitive to >512-byte sector size
    
    * tests/t5000-tags.sh: Use -m option and "unit s".
    FIXME: But still fails when invoked via
    PARTED_SECTOR_SIZE=2048 ./t5000-tags.sh --verbose --debug

commit eed0180d4384cafe2b3c2a5f9ac2b6b7af54330a
Author: Jim Meyering <meyering at redhat.com>
Date:   Fri Jul 11 20:20:34 2008 +0200

    t7000-scripting.sh: adapt to work with >512-byte sectors

commit 44fe9fc8917ae1dd882b7cfa75c8d4c6f43301fa
Author: Jim Meyering <meyering at redhat.com>
Date:   Fri Jul 11 16:48:56 2008 +0200

    label.c tests: don't skip dvh, now that it works; clean up

commit cd23d12b10d95adde01f3a65bd7324dc1120233d
Author: Jim Meyering <meyering at redhat.com>
Date:   Fri Jul 11 16:44:02 2008 +0200

    dvh: probe, read, clobber, write: adapt for >512-byte sectors

commit bcbad7443a7f7e7d55dee341d440fd4c942e5e49
Author: Jim Meyering <meyering at redhat.com>
Date:   Fri Jul 11 16:36:11 2008 +0200

    bsd.c: use pt-tools
    
    * libparted/labels/bsd.c: Include pt-tools.h.
    (bsd_write): Use ptt_write_sector.

commit 2adbc59e4a6f9aed9456859fbda67e1ffc73b230
Author: Jim Meyering <meyering at redhat.com>
Date:   Fri Jul 11 16:34:50 2008 +0200

    the beginnings of library partition-table tools
    
    * libparted/labels/pt-tools.h: New file.
    * libparted/labels/pt-tools.c: New file.
    * libparted/labels/Makefile.am (liblabels_la_SOURCES): Add them.

commit d5ce84371536c2a7e61e51ca3cd2de210e63e3ea
Author: Jim Meyering <meyering at redhat.com>
Date:   Fri Jul 11 12:27:17 2008 +0200

    avoid dvh label-clone test failure
    
    * libparted/labels/dvh.c (dvh_duplicate): Initialize with
    ped_disk_new_fresh, not with _ped_disk_alloc.  The former
    sets disk->update_mode = 1, as required (and enforced via an
    assertion in ped_disk_destroy).

commit b793beb100bc5adac325fba66e16c3f8bbf4c488
Author: Jim Meyering <meyering at redhat.com>
Date:   Fri Jul 11 11:18:16 2008 +0200

    * libparted/labels/gpt.c (gpt_clobber): Plug a leak.

commit 66d45b65148befc2fcebc57331475975e3375515
Author: Jim Meyering <meyering at redhat.com>
Date:   Fri Dec 21 15:39:09 2007 +0100

    amiga: Avoid writing uninitialized 1.5KB after initial 512B.

commit a9a7d2fb2476ca73e0f82d44bf0a43d66a0ad593
Author: Jim Meyering <meyering at redhat.com>
Date:   Tue Dec 18 16:17:06 2007 +0100

    disable some file-system-related probe tests for sector size > 512
    
    These changes keep us from recognizing most file systems
    when the sector size is larger than 512.  However, for now (while
    concentrating on getting partition table support right) that's not
    a problem.  Besides, the code we're avoiding would inevitably make
    parted smash its stack.
    
    * libparted/fs/linux_swap/linux_swap.c (_generic_swap_probe): Fail
    the swap-file-system-recognizing test when sector size is not 512.
    * libparted/filesys.c (ped_file_system_probe_specific): Fail all
    fs-specific probe-related tests when sector size is not 512.
    * libparted/fs/jfs/jfs.c (jfs_probe): For now, don't even try to
    deal with larger sector size.
    * libparted/label.c: Skip tests of problematic file system types.
    * tests/t0100-print.sh: Print with units of sectors, and adjust
    expected output accordingly.
    * tests/t1000-mkpartfs.sh: Use a smaller test file.

commit 9e9a62e77a51243880cdd456a1d5f969e0258c47
Author: Jim Meyering <jim at meyering.net>
Date:   Wed Jul 4 21:15:05 2007 +0200

    Fix compile failures.

commit a884e52a8a00ba35df241ac868976a65a54a8c1b
Author: Jim Meyering <jim at meyering.net>
Date:   Wed Jul 4 21:03:07 2007 +0200

    Add fat support for sector_size > 512.

commit c3308d8ab18d33ddd5e18686cde6fe64737fa783
Author: Jim Meyering <jim at meyering.net>
Date:   Wed Jul 4 20:50:18 2007 +0200

    avoid compiler warnings
    
    * libparted/fs/ext2/interface.c (_ext2_generic_probe): Likewise.
    (_ext2_clobber): Likewise.

commit 36e73f00c3cfe714b9af7295ba8f997cca1f1b3f
Author: Jim Meyering <jim at meyering.net>
Date:   Fri Jun 15 16:13:59 2007 +0200

    Make loop_probe and loop_clobber work with sector_size > 512, too.

commit ea2b5843995a79393353b9ea785c77daf94f3f41
Author: Jim Meyering <jim at meyering.net>
Date:   Fri Jun 15 16:06:34 2007 +0200

    Still working on making label support work.
    
    * libparted/fs/ext2/interface.c (_ext2_generic_probe): The call to
    ped_geometry_read_alloc would clobber the stack after SB whenever
    block_size > 512.  Instead, use new function, ped_geometry_read_alloc,
    and adjust all uses of SB.
    (_ext2_clobber): Likewise.
    * libparted/cs/geom.c (ped_geometry_read_alloc): New function.
    * include/parted/geom.h: Declare it.

commit ce624bb68aba91ae84f490874083428c6e2fac15
Author: Jim Meyering <jim at meyering.net>
Date:   Fri Jun 15 11:13:35 2007 +0200

    (msdos_clobber): Plug the leak I just introduced.

commit 93fd603b2c0838e8cffa09204c00840014ac4901
Author: Jim Meyering <jim at meyering.net>
Date:   Fri Jun 15 10:42:39 2007 +0200

    Make "mklabel loop" work with >512 sector_size, even when...
    
    there is an existing "msdos" label.
    (msdos_clobber): Make it work with >512 sector_size.

commit 088991b0aaa1e0a5c802175854bb17f87bb230a9
Author: Jim Meyering <jim at meyering.net>
Date:   Fri Jun 15 10:08:16 2007 +0200

    Make "mklabel loop" work with >512 sector_size.

commit 05907603e99a218c76d8f331e0ec9b4defec48c3
Author: Jim Meyering <jim at meyering.net>
Date:   Fri Jun 15 09:12:04 2007 +0200

    Make "mklabel msdos" work with >512 sector_size.

commit b4313430992f02fda0efa15a75e5fbe96db76208
Author: Jim Meyering <jim at meyering.net>
Date:   Fri Jun 15 08:59:44 2007 +0200

    Make "mklabel bsd" work with >512 sector_size.

commit 0e1176e00219149d55c324ff16631fe4f27e4ac9
Author: Jim Meyering <jim at meyering.net>
Date:   Thu Jun 14 12:48:50 2007 +0200

    Make "mklabel mac" work with >512-byte sector_size.

commit 4d21bd58a7056b1dcda0936910657fc40fa4e9f4
Author: Jim Meyering <jim at meyering.net>
Date:   Thu Jun 14 12:46:20 2007 +0200

    Add a FIXME comment.

commit 89bd63a4058851c0bf6c0e3958281025307529d5
Author: Jim Meyering <jim at meyering.net>
Date:   Fri Jun 1 19:10:56 2007 +0200

    start to make things work with 2048-byte sector size.
    
    Done so far: amiga, bsd, loop, gpt.
    Fix leaks along the way.
    remove unused label
    Add a cast to avoid a warning.

commit e13a561b34c230525d61728997c6c5b60c477cbe
Author: Jim Meyering <meyering at redhat.com>
Date:   Thu Jul 10 22:42:36 2008 +0200

    allow to simulate linux-file sector size via PARTED_SECTOR_SIZE envvar




More information about the Parted-commits mailing list