OSDN Git Service

android-x86/external-parted.git
9 years agoparted: fix building issues on Android 5.0 lollipop-x86
Chih-Wei Huang [Thu, 6 Nov 2014 08:19:47 +0000 (16:19 +0800)]
parted: fix building issues on Android 5.0

Now bionic is more complete. Remove duplicate definitions.

10 years agoparted: install the executable to /system/bin jb-x86 kitkat-x86 android-x86-4.4-r1 android-x86-4.4-r2 android-x86-4.4-r3
Chih-Wei Huang [Wed, 25 Dec 2013 04:30:06 +0000 (12:30 +0800)]
parted: install the executable to /system/bin

11 years agoparted: Integrate into Android build system
Andrew Boie [Mon, 5 Nov 2012 18:49:51 +0000 (10:49 -0800)]
parted: Integrate into Android build system

Added Android.mk for parted and support libs. Most porting
magic done in handcrafted config.h; however a few hacks necessary
in linux.c due to missing syscall.h in BIONIC.

All the stuff here is either new Makefiles, a hand-created
config.h, and various items generated by running automake/autoconf;
for example most of the headers here generated from .h.in files
already in the build.

Change-Id: I4595fdffbbd6f90bc23fe56f8aafb78524db1f22
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
11 years agoparted: Add gnulib
Andrew Boie [Mon, 5 Nov 2012 18:40:30 +0000 (10:40 -0800)]
parted: Add gnulib

This is present in the parted release tarball but not the git
repository and is required to run parted. Its use is approved in
the IP plan request for parted.

Android.mk added to build with Android.

Source:
http://ftp.gnu.org/gnu/parted/parted-3.1.tar.xz

Signature:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAABCAAGBQJPUQeUAAoJEH/Z/MsAC+7uwS0P/iplXKYgLCZ7PXhAy2QWSEgC
yEDNUN2hdK5RqXPzmyzTEObflRRkVQV8nWLBg9r5jCXKBKl0OEiBDSd9jwbdUSwI
6ueSsbrLLpwnQkqBsh7F9zwIJ2xDsPYmhOqxTbXpITn8fv9MAMPFm0+pGYgIPC4o
JITcP+8ufjjQpdecv/EmiM+3rrcMxgVi7/F158uj+ih4mxl7L4APG2hIib+Xdd8x
lqzVogAQoW6n5uoQo/F2zcGv/NPMH7LqwH435VEzc3FTEKQ4ArZ6o/hYasMALW2F
iXyjxQKDPBmiXOkKwmhRCBQtFVk1rpy6JSw07ljL2sZlScnKvq3AA9ufomdlgtIR
vBDRjkJeB1W12sk75eQRiP1RS3+TT1rpo9kvE4a1iZkMWrHPvaCDKM48MdN/Nvb6
nLafTM2FsHPEZ9HJCmEY4LRH0zmTJQy8KW5XSHFJgEhk22Jk5S951uTkM1sEbvHL
RRZHIGs/RZwetIUvFFEE87hZJ6OWO0XVStUnA+ik255XgN8Ik5o4K50hI3qU0/e3
3faMq6MpBYfQn5z1SO99/TE70hjyi8Q5E+SpuF3qn4cfhYi3zn8e6OaGNLVOXcWU
5/9WI5v9a5br/74RmIElsieetnMvlpbe9feAvsziQooNPe584qlQq7SXVegcXGNu
MUrTB6SjxheBtLqH0PlX
=0NA7
-----END PGP SIGNATURE-----

Change-Id: Ia4570a65fbfcdb4a9ef44388b756996bc736fe18
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
11 years agoremove .gitignore
Andrew Boie [Mon, 5 Nov 2012 19:23:25 +0000 (11:23 -0800)]
remove .gitignore

We actually want to check in changes to some of the files here.

Change-Id: I9ac620ce306c2ff2e2ba3af8f18576193f43135d
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
12 years agoversion 3.1
Jim Meyering [Fri, 2 Mar 2012 16:52:07 +0000 (17:52 +0100)]
version 3.1

* NEWS: Record release date.

12 years agomaint: bump library version to 2.0.0
Jim Meyering [Fri, 2 Mar 2012 16:07:03 +0000 (17:07 +0100)]
maint: bump library version to 2.0.0

* libparted/Makefile.am (CURRENT): Increment, since I removed
ped_realloc.

12 years agomaint: update README-release to reflect we now have two libraries
Jim Meyering [Fri, 2 Mar 2012 13:51:58 +0000 (14:51 +0100)]
maint: update README-release to reflect we now have two libraries

* README-release: Two sets of library version triples to adjust.
* bootstrap: Tiny fix from gnulib.

12 years agolib-fs-resize: remove unused probe-related code
Jim Meyering [Fri, 2 Mar 2012 11:29:04 +0000 (12:29 +0100)]
lib-fs-resize: remove unused probe-related code

* libparted/fs/r/hfs/probe.c: Remove probe-related functions.
There are not used.
* libparted/fs/r/fat/fat.c: Likewise.
* libparted/fs/r/hfs/probe.h: ...and declarations.

12 years agolibparted: avoid unwarranted failed assertion during mklabel
Jim Meyering [Sun, 26 Feb 2012 17:04:37 +0000 (18:04 +0100)]
libparted: avoid unwarranted failed assertion during mklabel

This could happen when running "parted -s $dev mklabel $type" for
nearly any $type, assuming the underlying disk's sector size is
larger than 512 bytes.  This particular failure was noticed by
running tests/t9050-partition-table-types.sh with a simulated
sector size of 1024, as is done as part of a top-level "make check",
but so far, this failure has shown up only on RHEL-6.2.
That test attempts to exercise an ugly part of partition table
creation: during creation, parted checks for an existing
partition table by iterating through its list of known types and
attempting to read the disk, looking for a preexisting table.
Knowing this, the test takes all pairs of partition table types,
<A,B> and first creates a type of type A, and then creates on top
of that (erasing the original) a table of type B.
* libparted/labels/mac.c (_disk_analyse_ghost_size): Remove bogus
assertion.  If the number of the sector with a matching signature
is too large, simply reject it by returning 0.
* NEWS (Bug fixes): Mention this.

12 years agodoc: improve NEWS
Jim Meyering [Sat, 25 Feb 2012 10:16:54 +0000 (11:16 +0100)]
doc: improve NEWS

* NEWS: Expand/adjust wording in two entries.

12 years agotests: sanitize PATH; do not discard mkswap output
Jim Meyering [Sun, 19 Feb 2012 14:31:58 +0000 (15:31 +0100)]
tests: sanitize PATH; do not discard mkswap output

* tests/init.cfg (sanitize_path_): New function, from coreutils.
Use it.
* tests/t9050-partition-table-types.sh: Do not discard mkswap output
and diagnostics.  This test would fail (e.g., on OpenSUSE 12.1), when
run with PATH not including /sbin.  Reported by Bruno Haible.

12 years agotests: skip failing use of mkfs.hfs unless using newer, fixed version
Jim Meyering [Sat, 18 Feb 2012 14:24:37 +0000 (15:24 +0100)]
tests: skip failing use of mkfs.hfs unless using newer, fixed version

The old, segfaulting version does not recognize the -v option, while
the new one does.  Use that to skip the test when it seems that
fsck.hfs is broken.
* tests/t3000-resize-fs.sh: Skip part of this root-only test
when fsck.hfs is the always-segfaulting version.

12 years agobuild,test: update gnulib, bootstrap and init.sh
Jim Meyering [Sat, 18 Feb 2012 13:29:41 +0000 (14:29 +0100)]
build,test: update gnulib, bootstrap and init.sh

* bootstrap: Update.
* tests/init.sh: Update.
* gnulib: Update.
* doc/po4a.mk: Updating gnulib pulls in newer syntax-check rules,
including one that rejects @lower_case@ variables in Makefiles.
Fix the sole violation: s/@mandir@/$(mandir)/

12 years agobuild: avoid non-srcdir build failure
Jim Meyering [Sat, 18 Feb 2012 14:40:49 +0000 (15:40 +0100)]
build: avoid non-srcdir build failure

* libparted/fs/Makefile.am: s!fsresize.sym!$(srcdir)/fsresize.sym!

12 years agomaint: placate syntax-check wrt tests/fs-resize.c
Jim Meyering [Fri, 10 Feb 2012 19:10:33 +0000 (20:10 +0100)]
maint: placate syntax-check wrt tests/fs-resize.c

* tests/fs-resize.c (main): Remove unused #includes.
Do use set_program_name, to placate syntax-check.

12 years agodoc: mention HFS+/FAT file system resizing in NEWS
Jim Meyering [Fri, 3 Feb 2012 21:40:43 +0000 (22:40 +0100)]
doc: mention HFS+/FAT file system resizing in NEWS

* NEWS (New features): Mention it.

12 years agotests: test FAT and HFS file system resizing
Jim Meyering [Fri, 13 Jan 2012 17:33:18 +0000 (18:33 +0100)]
tests: test FAT and HFS file system resizing

* tests/t3000-resize-fs.sh: New test.
* tests/Makefile.am (TESTS): Add it.
(check_PROGRAMS): Add fs-resize.
(fs_resize_LDADD): Define, so it links with both libraries.

12 years agotests: add FS-resize test driver
Christoph Hellwig [Fri, 3 Feb 2012 16:57:45 +0000 (17:57 +0100)]
tests: add FS-resize test driver

* tests/fs-resize.c: New file, to test FAT/HFS resizing.

12 years agolib-fs-resize: use linker script to expose only selected functions
Jim Meyering [Thu, 12 Jan 2012 19:48:52 +0000 (20:48 +0100)]
lib-fs-resize: use linker script to expose only selected functions

* libparted/fs/Makefile.am (libparted_fs_resize_la_LDFLAGS): Define.
(EXTRA_DIST): Distribute the new file.
(libparted_fs_resize_la_DEPENDENCIES): Make the library depend on it.
* libparted/fs/fsresize.sym: New file.

12 years agomaint: remove r/hfs/DOC,HISTORY,TODO; add VERSION for new library
Jim Meyering [Thu, 12 Jan 2012 18:49:47 +0000 (19:49 +0100)]
maint: remove r/hfs/DOC,HISTORY,TODO; add VERSION for new library

12 years agolib-fs-resize: rewrite ped_file_system_clobber
Jim Meyering [Tue, 20 Dec 2011 09:27:45 +0000 (10:27 +0100)]
lib-fs-resize: rewrite ped_file_system_clobber

Before, it would probe for an existing file system type and then,
according to what it found, call the corresponding <FS_TYPE>_clobber
function.  Now that we have restored only HFS and FAT FS-writing
support, only those few types have a corresponding _clobber function.
We would obviously fail to clear common types of file systems, and even
if we were to restore all previous _clobber functions, none of those
were able to handle sector sizes larger than 512.  Not worth it.
* libparted/fs/r/filesys.c: Include pt-tools.h.
(MIN): Define.
(ped_file_system_clobber): Rewrite not to use hfs*_clobber or
fat_clobber.  Instead, simply clear the first three and last two
sectors of the specified "device".
* libparted/fs/Makefile.am (INCLUDES): Add
-I$(top_srcdir)/libparted/labels for new use of a ptt_* function.

12 years agolib-fs-resize: add wrappers for open,close,resize,get_resize_constraint
Jim Meyering [Mon, 19 Dec 2011 22:23:52 +0000 (23:23 +0100)]
lib-fs-resize: add wrappers for open,close,resize,get_resize_constraint

* libparted/fs/r/filesys.c: Implement ped_file_system_resize,
ped_file_system_open, ped_file_system_close and
ped_file_system_get_resize_constraint.
* libparted/fs/r/hfs/hfs.c: Give a few functions global scope,
so we can use them from the above.
* libparted/fs/Makefile.am: Use automake's subdir-objects option.
This avoids conflicts with multiple *.o file names
(e.g., fat.o), now that two directories provide that name.
(AM_CFLAGS): Disable $(WERROR_CFLAGS), for now.

12 years agomaint: update copyrights in r/
Jim Meyering [Thu, 12 Jan 2012 16:39:12 +0000 (17:39 +0100)]
maint: update copyrights in r/

12 years agolib-fs-resize: re-add HFS and FAT file-system-related code
Jim Meyering [Mon, 19 Dec 2011 17:31:23 +0000 (18:31 +0100)]
lib-fs-resize: re-add HFS and FAT file-system-related code

This just adds the code, without hooking it up yet.
* po/POTFILES.in: Add all libparted/fs/r/**.c files.

12 years agomaint: remove now-unused fat-related functions
Jim Meyering [Mon, 19 Dec 2011 10:44:03 +0000 (11:44 +0100)]
maint: remove now-unused fat-related functions

* libparted/fs/fat/bootsector.c (fat_boot_sector_generate)
(fat_boot_sector_write, fat_info_sector_write): Remove functions.
(fat_boot_sector_set_boot_code): Likewise.
* libparted/fs/fat/bootsector.h: Remove declarations.
* libparted/fs/fat/fat.c (fat_set_frag_sectors, fat_free_buffers):
Remove function.
* libparted/fs/fat/fat.h: Remove declarations.

12 years agotests: set PARTED_TEST_NAME, for valgrind
Jim Meyering [Mon, 6 Feb 2012 14:02:12 +0000 (15:02 +0100)]
tests: set PARTED_TEST_NAME, for valgrind

* tests/Makefile.am (PARTED_TEST_NAME): Define.
* tests/t0211-gpt-rewrite-header.sh: Clarify a comment.

12 years agolibparted: gpt: avoid heap-read-overrun when rewriting 9-PTE table
Jim Meyering [Mon, 6 Feb 2012 14:00:53 +0000 (15:00 +0100)]
libparted: gpt: avoid heap-read-overrun when rewriting 9-PTE table

Now that parted can rewrite a corrupt-or-misaligned 9-PTE table,
we have to be careful to allocate space for slightly more data
when the byte-count required for a PTE table is smaller than
the whole number of sectors would imply.  I.e., when the PTE table
size is not a multiple of the sector size, there is a fraction of
that final sector for which we do not read data, but we do write.
Ensure we have space for the buffer we'll write and that it is
initialized (to 0's).
* libparted/labels/gpt.c (gpt_write): Allocate the right amount of
space.  Use calloc, not malloc+memset.

12 years agomaint: adjust the URL that will appear in the generated announcement
Jim Meyering [Fri, 3 Feb 2012 21:24:45 +0000 (22:24 +0100)]
maint: adjust the URL that will appear in the generated announcement

* cfg.mk (url_dir_list): Use this http://ftp.gnu.org/gnu/$(PACKAGE)
for the first link listed in the generated announcement.
announce-gen now provides the faster mirror link automatically.

12 years agoui: rewrite disk_print_flags and partition_print_flags
Jim Meyering [Fri, 3 Feb 2012 14:55:19 +0000 (15:55 +0100)]
ui: rewrite disk_print_flags and partition_print_flags

* parted/parted.c (disk_print_flags): Avoid NULL-dereference on
failed malloc.  Use xrealloc, not ped_realloc.
(partition_print_flags): Likewise; nearly identical code.

12 years agotests: avoid relatively harmless new "make syntax-check" failure
Jim Meyering [Fri, 3 Feb 2012 15:38:25 +0000 (16:38 +0100)]
tests: avoid relatively harmless new "make syntax-check" failure

* tests/t0209-gpt-pmbr_boot.sh: Reverse compare arguments.

12 years agolibparted: remove ped_realloc, now unused
Jim Meyering [Fri, 3 Feb 2012 15:11:53 +0000 (16:11 +0100)]
libparted: remove ped_realloc, now unused

* include/parted/parted.in.h (ped_realloc): Remove declaration.
* libparted/libparted.c (ped_realloc): Remove definition.

12 years agodoc: update parted documentation
Brian C. Lane [Wed, 1 Feb 2012 21:12:00 +0000 (13:12 -0800)]
doc: update parted documentation

* doc/parted.text: Add disk_set command.

12 years agotests: add test for GPT PMBR pmbr_boot flag
Brian C. Lane [Wed, 1 Feb 2012 21:11:59 +0000 (13:11 -0800)]
tests: add test for GPT PMBR pmbr_boot flag

* tests/t0209-gpt-pmbr_boot.sh: New test
* tests/Makefile.am: Add new test
* NEWS: Add information about the GPT PMBR pmbr_boot flag

12 years agotests: update tests for new disk flags output
Brian C. Lane [Wed, 1 Feb 2012 21:11:58 +0000 (13:11 -0800)]
tests: update tests for new disk flags output

* tests/t0010-script-no-ctrl-chars.sh: Updated
* tests/t0100-print.sh: Updated
* tests/t0101-print-empty.sh: Updated
* tests/t0220-gpt-msftres.sh: Updated
* tests/t0250-gpt.sh: Updated
* tests/t0280-gpt-corrupt.sh: Updated
* tests/t2310-dos-extended-2-sector-min-offset.sh: Updated
* tests/t4000-sun-raid-type.sh: Updated
* tests/t4100-dvh-partition-limits.sh: Updated
* tests/t4100-msdos-partition-limits.sh: Updated
* tests/t4100-msdos-starting-sector.sh: Updated
* tests/t4200-partprobe.sh: Updated
* tests/t5000-tags.sh: Updated
* tests/t6000-dm.sh: Updated
* tests/t9040-many-partitions.sh: Updated
* tests/t9041-undetected-in-use-16th-partition.sh: Updated

12 years agoparted: when printing, also print the new disk flags
Brian C. Lane [Sat, 28 Jan 2012 00:59:03 +0000 (16:59 -0800)]
parted: when printing, also print the new disk flags

This adds a 'Disk Flags:' line the displays the active disk flags.
In machine mode this is appended to the disk info line, after the
device model.

* parted/parted.c (disk_print_flags): New function
(_print_disk_info): Add Disk Flags information.

12 years agogpt: add commands to manipulate pMBR boot flag
Matthew Garrett [Wed, 1 Feb 2012 14:12:20 +0000 (15:12 +0100)]
gpt: add commands to manipulate pMBR boot flag

Some BIOS systems will only boot from GPT partitions if the boot flag is
set on the protective MBR partition. This adds the ability to set this
flag using the disk_set and disk_toggle commands.
* include/parted/disk.in.h (_PedDiskFlag): Add PED_DISK_GPT_PMBR_BOOT
* libparted/disk.c (ped_disk_flag_get_name): Add PED_DISK_GPT_PMBR_BOOT
* libparted/labels/gpt.c (_GPTDiskData): Add pmbr_boot flag.
(gpt_alloc): Init pmbr_boot to 0.
(gpt_read_headers): Set pmbr_boot state from PMBR boot flag.
(_write_pmbr): Add pmbr_boot flag and set PMBR boot flag from it.
(gpt_write): Pass pmbr_boot flag through to _write_pmbr
(gpt_disk_set_flag): New function
(gpt_disk_is_flag_available): New function
(gpt_disk_get_flag): New function
(gpt_disk_ops): Add disk_set_flag, disk_get_flag, disk_is_flag_available
* parted/parted.c (do_disk_set): New function
(do_disk_toggle): New function
(_init_commands): Add do_disk_set and do_disk_toggle
* parted/ui.c (command_line_get_disk_flag): New function
* parted/ui.h: Add command_line_get_disk_flag prototype.

12 years agotests: create 128 partitions also in the scsi-backed test
Jim Meyering [Mon, 23 Jan 2012 20:32:00 +0000 (21:32 +0100)]
tests: create 128 partitions also in the scsi-backed test

* tests/t9040-many-partitions.sh: Tighten up: use less memory:
1 sector per partition rather than 256.
Exec parted just once, not once per partition.
With that, we can increase the number of partitions to create
from 60 (which used to take 2.5 minutes on an F12-era kernel)
to the standard-GPT-header-imposed maximum of 128.
Suggested by Phillip Susi.

12 years agotests: exercise today's bug fix, creating a GPT table with 128 entries
Jim Meyering [Mon, 23 Jan 2012 19:01:30 +0000 (20:01 +0100)]
tests: exercise today's bug fix, creating a GPT table with 128 entries

* tests/t0212-gpt-many-partitions.sh: New test.
* tests/Makefile.am (TESTS): Add it.

12 years agolibparted: gpt: avoid invalid free with many (~100) partitions
Jim Meyering [Mon, 23 Jan 2012 18:55:39 +0000 (19:55 +0100)]
libparted: gpt: avoid invalid free with many (~100) partitions

* parted/parted.c (do_print): Remove invalid free.
Bug introduced via v1.8.8.1-19-gb56d69c.
* NEWS (Bug fixes): Mention this.

12 years agotests: test for yesterday's bug fix
Jim Meyering [Sun, 22 Jan 2012 13:56:47 +0000 (14:56 +0100)]
tests: test for yesterday's bug fix

* tests/Makefile.am (TESTS): Add it.
* tests/t0211-gpt-rewrite-header.sh: New test.

12 years agolibparted: gpt: rewrite even a 9-partition-entry table properly
Jim Meyering [Sat, 21 Jan 2012 11:50:59 +0000 (12:50 +0100)]
libparted: gpt: rewrite even a 9-partition-entry table properly

The vast majority of GPT partition tables have 128 PTEs (partition
table entries.  However, zfs-related ones have only 9, and when
rewriting one (which can happen only in interactive mode), parted
would fail to write the full PTE array whenever the PTE array size
was not a multiple of the sector size.  This fixes the same type
of bug as v3.0-45-gce85c51.
* libparted/labels/gpt.c (gpt_write): When computing how many sectors
to write for the PTE array, round up rather than truncating.  This
matters only when n_PTEs * 128 is not a multiple of the sector size.
For details on how to reproduce see the test or
http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10691/focus=10695
* NEWS (Bug fixes): Mention it.

12 years agomaint: clean-up preparing for bug fix
Jim Meyering [Sat, 21 Jan 2012 10:49:08 +0000 (11:49 +0100)]
maint: clean-up preparing for bug fix

* libparted/labels/gpt.c (gpt_write): Rename local:
s/ptes_size/ptes_bytes/; declare as size_t, not "int".
Move decls "down".

12 years agolibparted: raise dos partition limit from 16 to 64
Phillip Susi [Fri, 13 Jan 2012 21:21:52 +0000 (16:21 -0500)]
libparted: raise dos partition limit from 16 to 64

* NEWS (Bug fixes): Mention it.
* libparted/labels/dos.c (MAX_TOTAL_PART): s/16/64/
* tests/t9042-dos-partition-limit.sh: s/13/61/ (MAX_TOTAL_PART-3)
(adjust/factor some of the logic - jmm)

12 years agolibparted: enforce dos partition limit
Phillip Susi [Fri, 13 Jan 2012 21:21:51 +0000 (16:21 -0500)]
libparted: enforce dos partition limit

The msdos partition table claimed a maximum partition count of 16
but would allow you to go beyond that.  This resulted in the kernel
not being informed of those partitions.  Corrected to enforce the
limit.

* NEWS (Bug fixes): Mention it.
* libparted/labels/dos.c (next_primary): Return -1 upon failure.
(next_logical): Stop no later than MAX_TOTAL_PART.
Throw exception and return -1 upon failure.
(msdos_partition_enumerate): Convert a negative partition number
return value from either of the above two to failure (return 0).
* tests/t9042-dos-partition-limit.sh: New file.
* tests/Makefile.am (TESTS): Add it.

12 years agobuild: revert the recent "fix" to avoid make warnings about linux.lo
Jim Meyering [Fri, 13 Jan 2012 22:02:21 +0000 (23:02 +0100)]
build: revert the recent "fix" to avoid make warnings about linux.lo

It avoided the warning, but introduced a real problem
when building from a clean directory.
The real solution will have to wait, since it appears to
depend on a fix in automake.

This reverts commit a3c351c2d1cf2c0000bbc681959695c612bd19a0.

12 years agobuild: don't use -version for convenience libraries
Jim Meyering [Fri, 13 Jan 2012 18:10:46 +0000 (19:10 +0100)]
build: don't use -version for convenience libraries

Don't use -release, either.  This avoids warnings from libtool.
* libparted/fs/Makefile.am (libfs_la_LDFLAGS): Remove.

12 years agobuild: use LT_INIT, to make bootstrap run libtoolize
Jim Meyering [Fri, 13 Jan 2012 18:03:48 +0000 (19:03 +0100)]
build: use LT_INIT, to make bootstrap run libtoolize

* configure.ac: Use LT_INIT, so that bootstrap runs libtoolize,
which creates build-aux/ltmain.sh.

12 years agomaint: remove useless BUILD_LINUX conditional
Jim Meyering [Thu, 12 Jan 2012 16:45:57 +0000 (17:45 +0100)]
maint: remove useless BUILD_LINUX conditional

* configure.ac (BUILD_LINUX): Don't set it.
* libparted/Makefile.am (BUILD_LINUX): Remove useless use.

12 years agomaint: avoid long-standing warnings from make:
Jim Meyering [Thu, 12 Jan 2012 18:03:20 +0000 (19:03 +0100)]
maint: avoid long-standing warnings from make:

  Makefile:1274: warning: overriding recipe for target `linux.lo'
  Makefile:1267: warning: ignoring old recipe for target `linux.lo'

* libparted/Makefile.am (EXTRA_DIST): Rename from
EXTRA_libparted_la_SOURCES.

12 years agolibparted: provide a new convenience function: ptt_geom_clear_sectors
Jim Meyering [Wed, 21 Dec 2011 15:56:17 +0000 (16:56 +0100)]
libparted: provide a new convenience function: ptt_geom_clear_sectors

* libparted/labels/pt-tools.c (ptt_geom_clear_sectors): New function.
* libparted/labels/pt-tools.h: Declare it.

12 years agomaint: remove "MAINTAINERCLEANFILES = Makefile.in" from Makefile.am's
Jim Meyering [Wed, 11 Jan 2012 08:45:17 +0000 (09:45 +0100)]
maint: remove "MAINTAINERCLEANFILES = Makefile.in" from Makefile.am's

* debug/Makefile.am: As above.
* debug/test/Makefile.am: Likewise.
* doc/C/Makefile.am: Likewise.
* doc/pt_BR/Makefile.am: Likewise.
* include/Makefile.am: Likewise.
* include/parted/Makefile.am: Likewise.
* libparted/Makefile.am: Likewise.
* libparted/fs/Makefile.am: Likewise.
* libparted/tests/Makefile.am: Likewise.
* partprobe/Makefile.am: Likewise.
* doc/Makefile.am: Likewise, for mdate-sh and texinfo.tex.

12 years agobuild: insert -I$(top_builddir)/include before -I$(top_srcdir)/include
Keshav P R [Tue, 10 Jan 2012 11:38:31 +0000 (12:38 +0100)]
build: insert -I$(top_builddir)/include before -I$(top_srcdir)/include

everywhere, for those who perform non-srcdir builds from a pristine
cloned directory.  There is no problem when building from a tarball,
since that includes include/parted/*.h files under $(top_srcdir).
* libparted/Makefile.am: Insert it.
* libparted/fs/Makefile.am: Likewise.
* libparted/labels/Makefile.am: Likewise.
* libparted/tests/Makefile.am: Likewise.
* parted/Makefile.am: Likewise.
* partprobe/Makefile.am: Likewise.
* tests/Makefile.am: Likewise.

12 years agobuild: .gitignore: ignore more
Jim Meyering [Tue, 10 Jan 2012 11:38:50 +0000 (12:38 +0100)]
build: .gitignore: ignore more

12 years agomaint: hoist libparted/fs/*/Makefile.am into parent Makefile.am
Jim Meyering [Tue, 10 Jan 2012 10:48:52 +0000 (11:48 +0100)]
maint: hoist libparted/fs/*/Makefile.am into parent Makefile.am

There was no need to have a separate Makefile.am for each file system
type, and a good reason *not* to do that (reduce duplication).
* configure.ac (AC_OUTPUT): Remove Makefiles.
* libparted/fs/Makefile.am (SUBDIRS): Remove.
(EXTRA_DIST): List the two non-src files: hfs/DOC hfs/HISTORY.
(libfs_la_SOURCES): Hoist file names to here from...
* libparted/fs/amiga/Makefile.am: ...here.
* libparted/fs/ext2/Makefile.am: Likewise.
* libparted/fs/fat/Makefile.am: Likewise.
* libparted/fs/hfs/Makefile.am: Likewise.
* libparted/fs/jfs/Makefile.am: Likewise.
* libparted/fs/linux_swap/Makefile.am: Likewise.
* libparted/fs/nilfs2/Makefile.am: Likewise.
* libparted/fs/ntfs/Makefile.am: Likewise.
* libparted/fs/reiserfs/Makefile.am: Likewise.
* libparted/fs/ufs/Makefile.am: Likewise.
* libparted/fs/xfs/Makefile.am: Likewise.
* libparted/fs/*/Makefile.am: Remove files.
* libparted/fs/amiga/a-interface.c: Now that the .o files are all
in the same place, rename from interface.c, to avoid collision with
name of .o file from ext2/interface.c.

12 years agobuild: correct my typo in preceding commit
Jim Meyering [Tue, 10 Jan 2012 10:21:52 +0000 (11:21 +0100)]
build: correct my typo in preceding commit

* configure.ac (AC_CONFIG_SRCDIR): Correct preceding commit.
Keshav's patch was correct, but when I attempted to do the same
thing manually I wrote .h.in rather than .in.h.

12 years agobuild: update AC_CONFIG_SRCDIR for non-srcdir-from-clone builds
Keshav P R [Tue, 10 Jan 2012 10:10:59 +0000 (11:10 +0100)]
build: update AC_CONFIG_SRCDIR for non-srcdir-from-clone builds

* configure.ac (AC_CONFIG_SRCDIR): List parted.h.in, rather than
the now-generated parted.h, for those who run configure not from
a distribution tarball, but from a non-srcdir build using a pristine
clone.

12 years agomaint: rename public .h files to .in.h
Jim Meyering [Mon, 9 Jan 2012 18:42:49 +0000 (19:42 +0100)]
maint: rename public .h files to .in.h

Generate .h files from .in.h files, so that we can continue
to use _GL_ATTRIBUTE_PURE and _GL_ATTRIBUTE_CONST in the primary
sources, without including them in publicly-installed files.
Each generated (and later installed) header file gets expansions
of those macros.
* include/parted/Makefile.am: New rules.
* .gitignore: Ignore the generated files.
* Makefile.am (SUBDIRS): Reorder so we build in include/ before
libparted, i.e., so that we generate the .h files we'll need.

12 years agoparted.h: use _GL_ATTRIBUTE_CONST and _GL_ATTRIBUTE_PURE in VC'd files
Jim Meyering [Mon, 9 Jan 2012 18:11:23 +0000 (19:11 +0100)]
parted.h: use _GL_ATTRIBUTE_CONST and _GL_ATTRIBUTE_PURE in VC'd files

However, we will replace those strings with their expansions when
installing them.
* include/parted/parted.h: Revert part of commit v3.0-83-gd51bfc0.

12 years agotests: root-only test would fail to remove its loop device
Jim Meyering [Mon, 9 Jan 2012 14:29:45 +0000 (15:29 +0100)]
tests: root-only test would fail to remove its loop device

* tests/t8001-loop-blkpg.sh: Ironically, when skipping this test,
there was a race condition where in more than 7 out of 10 trials,
this test's "losetup -d $dev" command would fail with "device in use".
Hence, with enough testing, I would eventually use up all loop devices
and start getting new test failures due to losetup *creation* failure.

12 years agobuild: fix "make distcheck" failure
Jim Meyering [Mon, 9 Jan 2012 14:04:40 +0000 (15:04 +0100)]
build: fix "make distcheck" failure

Ever since "make distcheck" began using sudo (i.e., running "make check"
as root, and then running it as non-root), the build-after-root would
often fail due to some derived files being owned by root.
This change adds a "chown -R $USER ." to restore order.
* Makefile.am (root-check): Run "chown -R $USER ." after sudo run.
(root_check): Rename variable from root-check, to avoid a warning
from automake about non-POSIX variable.

12 years agobuild: appease gcc's -Werror=suggest-attribute=pure
Jim Meyering [Mon, 9 Jan 2012 13:45:34 +0000 (14:45 +0100)]
build: appease gcc's -Werror=suggest-attribute=pure

* parted/strlist.c (wchar_strcasecmp): Add pure attribute; make static.
(wchar_strncasecmp): Likewise.
(wchar_strdup): Likewise.

12 years agobuild: update to latest from gnulib
Jim Meyering [Mon, 9 Jan 2012 11:07:20 +0000 (12:07 +0100)]
build: update to latest from gnulib

* bootstrap: Update.
* tests/init.sh: Likewise.
* gnulib: Update submodule to latest.

maint: remove two generated files in doc/
* doc/fdl.texi: Remove file from version control.  It is generated.
* doc/gendocs_template: Likewise.
* doc/parted.texi: Add @node ... before inclusion of fdl.texi,
since fdl.texi dropped that part.
* doc/parted-pt_BR.texi: Likewise.
* doc/.gitignore: Update.

build: accommodate newer bootstrap from gnulib
* bootstrap.conf (gnulib_tool_option_extras): Add both --symlink
and --makefile-name=gnulib.mk.  Remove stray use of $bt.
* lib/Makefile.am: Initialize all of the following so that
generated code in gnulib.mk may use += to append to those variables:
AM_CFLAGS, AM_CPPFLAGS, BUILT_SOURCES, CLEANFILES, EXTRA_DIST,
MAINTAINERCLEANFILES, MOSTLYCLEANDIRS, MOSTLYCLEANFILES, SUFFIXES,
noinst_LTLIBRARIES.

12 years agolibparted: gpt: a smaller device need not render both headers invalid
Jim Meyering [Mon, 9 Jan 2012 08:21:09 +0000 (09:21 +0100)]
libparted: gpt: a smaller device need not render both headers invalid

Putting a valid GPT-labeled image on a smaller device, (i.e., one that
truncates the backup GPT header, but that does not impact the primary
one) should not render the primary header invalid.
* libparted/labels/gpt.c (_header_is_valid): Do *not* reject a header
when its last_usable value is larger than the device length.
This reverts part of commit v3.0-10-g99f9c6a, "gpt: don't abort for a
truncated GPT-formatted device".  With this change, running parted in
interactive mode with such an image/device combination will recognize
that only the backup header is corrupt, and will offer to correct it.
Before, it would report that both headers were corrupt.
* tests/t0203-gpt-shortened-device-primary-valid.sh: New file.
* tests/Makefile.am (TESTS): Add it.

12 years agogpt: eliminate four PED_ASSERT uses
Jim Meyering [Fri, 30 Dec 2011 20:03:06 +0000 (21:03 +0100)]
gpt: eliminate four PED_ASSERT uses

* libparted/labels/gpt.c (_parse_header): Convert a few PED_ASSERT
uses to friendlier 'test-and-return-0's. Reported by Graham Markall
in http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10653

12 years agolibparted: don't use _GL_ATTRIBUTE_CONST in public parted.h, ...
Jim Meyering [Sun, 8 Jan 2012 19:43:26 +0000 (20:43 +0100)]
libparted: don't use _GL_ATTRIBUTE_CONST in public parted.h, ...

Instead, use the bare __attribute__((__const__)).
* include/parted/parted.h (__attribute): Define.
(ped_get_version): Use open-coded __attribute.
Prompted by a report from Keshav P R.

12 years agotests: fix misleading mkpart usage
Jim Meyering [Sun, 8 Jan 2012 17:03:34 +0000 (18:03 +0100)]
tests: fix misleading mkpart usage

Using "primary" is fine (and common) as a partition *type* for dos
partition tables, but with a partition table of type GPT, it is
downright misleading to specify the partition *name* as "primary".
* tests/t0220-gpt-msftres.sh: Use "p-name" as partition name,
rather than misleading "primary".
* tests/t7000-scripting.sh: Likewise.

12 years agotests: skip loop-partitioning tests when ext_range is < 2
Jim Meyering [Wed, 4 Jan 2012 13:26:20 +0000 (14:26 +0100)]
tests: skip loop-partitioning tests when ext_range is < 2

* tests/init.cfg (require_partitionable_loop_device_): New function.
* tests/t8001-loop-blkpg.sh: Use it.
* tests/t8000-loop.sh: Use it.

12 years agolibparted: remove _blkpg_get_partition
Jim Meyering [Thu, 5 Jan 2012 19:48:19 +0000 (20:48 +0100)]
libparted: remove _blkpg_get_partition

[I applied Phillip's initial patch, omitting both my adjustments
and his own v2 changes.  This addresses both of those omissions. ]
* libparted/arch/linux.c (_blkpg_get_partition): Remove function
and sole use, per patch from Phillip Susi.
(_kernel_get_partition_start_and_length): Adjust formatting,
remove unnecessary test and correct a diagnostic.

12 years agolibparted: avoid the HDIO_GETGEO ioctl when possible
Phillip Susi [Sat, 17 Dec 2011 04:05:40 +0000 (23:05 -0500)]
libparted: avoid the HDIO_GETGEO ioctl when possible

We were using the long depreciated HDIO_GETGEO ioctl on the
partition to get its start sector.  Use the new BLKPG_GET_PARTITION
ioctl instead.  This allows for disks > 2TB and partitioned loop
devices, which don't support HDIO_GETGEO.  As a fallback when
BLKPG_GET_PARTITION fails or is not availible, try getting the
values from sysfs, and finally use BLKGETSIZE64 and HDIO_GETGEO
as a last resort.

12 years agolibparted: remove has_partitions check to allow loopback partitions
Phillip Susi [Sat, 17 Dec 2011 04:05:39 +0000 (23:05 -0500)]
libparted: remove has_partitions check to allow loopback partitions

Commit 1b766b69 added the _has_partitions function to check if a device
was a loop device and if so, skip updating the kernel partition table
because loop devices did not support partitions.  This function never
worked anyway, and loop devices now (since linux 3.2) support
partitions, so remove this crufty code.
* libparted/arch/linux.c (_has_partitions): Remove function and
all uses.

12 years agolibparted: remove _loop_get_partition_range
Phillip Susi [Sat, 17 Dec 2011 03:40:04 +0000 (22:40 -0500)]
libparted: remove _loop_get_partition_range

Commit 1eb0cc30 added support for loop devices to be partitioned,
but it only enabled that support if the kernel parameter max_part
was non zero.  This parameter just reserves minor numbers for
partitions in the traditional sequence that hard disks used.
When it is zero, it is still possible to add partitions, they
just will get minor numbers from another pool.  Removing this
check allows partitions to be used on loop devices even when the
loop module was not loaded with the max_part argument.
* libparted/arch/linux.c (_loop_get_partition_range): Remove function
and all uses.

12 years agotests: fix a bug in wait_for_dev_to_disappear_ helper function
Jim Meyering [Thu, 5 Jan 2012 17:24:41 +0000 (18:24 +0100)]
tests: fix a bug in wait_for_dev_to_disappear_ helper function

* tests/t-lib-helpers.sh (wait_for_dev_to_disappear_): Correct
typo: missing expr in subshell.

12 years agolibparted: linux: exclude floppy from device scan
Phillip Susi [Wed, 4 Jan 2012 19:40:13 +0000 (14:40 -0500)]
libparted: linux: exclude floppy from device scan

Floppies can't be partitioned anyhow, and some people have a
misconfigured BIOS that thinks there is a floppy when there
actually isn't, and trying to scan it causes hanging.

12 years agotests: try harder to clean up scsi_debug
Phillip Susi [Tue, 3 Jan 2012 01:12:42 +0000 (20:12 -0500)]
tests: try harder to clean up scsi_debug

Tests were failing because the previous test gave up while trying to
unload the scsi_debug module.  Try longer to remove it, and then throw
in a call to udevadm settle for good measure.
* tests/t-local.sh: Try harder to release resources here, rather than...
* tests/t9040-many-partitions.sh: ...in this one test.
* tests/t-local.sh (require_scsi_debug_module_): Now that
cleanup requires "udevadm settle", add that requirement here:
call require_udevadm_settle_.

12 years agomaint: update all copyright year number ranges
Jim Meyering [Sun, 1 Jan 2012 09:17:25 +0000 (10:17 +0100)]
maint: update all copyright year number ranges

Run "make update-copyright".

12 years agodoc: add NEWS entry for "Add partition separator only when required"
Phillip Susi [Wed, 14 Dec 2011 20:32:36 +0000 (15:32 -0500)]
doc: add NEWS entry for "Add partition separator only when required"

12 years agoAdd partition separator only when required
Phillip Susi [Wed, 7 Dec 2011 04:20:50 +0000 (23:20 -0500)]
Add partition separator only when required

Device mapper type should not automatically
mean add 'p' before the partition number.  Fall back to
adding it only if the previous character is a digit.
This complies with kpartx behavior and linux behavior
"since the dawn of time".

12 years agobuild: update gnulib submodule to latest
Jim Meyering [Sat, 3 Dec 2011 13:10:48 +0000 (14:10 +0100)]
build: update gnulib submodule to latest

12 years agobuild: address a new "noreturn" suggestion
Jim Meyering [Sat, 3 Dec 2011 14:24:35 +0000 (15:24 +0100)]
build: address a new "noreturn" suggestion

* parted/ui.h (help_msg): Declare as __noreturn__.

12 years agobuild: configure.ac: use -Wno-format-nonliteral
Jim Meyering [Sat, 3 Dec 2011 14:16:16 +0000 (15:16 +0100)]
build: configure.ac: use -Wno-format-nonliteral

12 years agobuild: mark functions with "const" or "pure" attribute, per gcc warnings
Jim Meyering [Sat, 3 Dec 2011 13:57:26 +0000 (14:57 +0100)]
build: mark functions with "const" or "pure" attribute, per gcc warnings

Use _GL_ATTRIBUTE_PURE or _GL_ATTRIBUTE_CONST.  Mark static functions at
point of definition; extern ones at point of declaration.
* include/parted/crc32.h:
* include/parted/device.h: Likewise.
* include/parted/disk.h: Likewise.
* include/parted/exception.h: Likewise.
* include/parted/filesys.h: Likewise.
* include/parted/geom.h: Likewise.
* include/parted/natmath.h: Likewise.
* include/parted/parted.h: Likewise.
* include/parted/unit.h: Likewise.
* libparted/arch/linux.c: Likewise.
* libparted/disk.c: Likewise.
* libparted/exception.c: Likewise.
* libparted/fs/amiga/amiga.h: Likewise.
* libparted/labels/aix.c: Likewise.
* libparted/labels/bsd.c: Likewise.
* libparted/labels/dos.c: Likewise.
* libparted/labels/dvh.c: Likewise.
* libparted/labels/efi_crc32.c: Likewise.
* libparted/labels/gpt.c: Likewise.
* libparted/labels/mac.c: Likewise.
* libparted/labels/pc98.c: Likewise.
* libparted/labels/rdb.c: Likewise.
* libparted/labels/sun.c: Likewise.
* libparted/unit.c: Likewise.
* parted/ui.c: Likewise.
* parted/strlist.c: Likewise.
* parted/strlist.h: Likewise.
* libparted/tests/common.h (_implemented_disk_label): Mark as pure.
* libparted/cs/natmath.c (extended_euclid): Mark as pure.

12 years agobuild: avoid new float-to-double warnings
Jim Meyering [Sat, 3 Dec 2011 13:28:41 +0000 (14:28 +0100)]
build: avoid new float-to-double warnings

* libparted/timer.c (ped_timer_new_nested): Mark literal floating point
constants with "f" suffix, since they are compared against "float"s.
* parted/parted.c (_timer_handler): Likewise.

12 years agobuild: tweak how bootstrap manages ChangeLog
Jim Meyering [Sat, 3 Dec 2011 14:35:12 +0000 (15:35 +0100)]
build: tweak how bootstrap manages ChangeLog

* bootstrap.conf: Create ChangeLog only by touching it, so that
it doesn't ever remove my in-use symlink (w/vc-dwim).

12 years agotests: two more of these: use "compare exp out", not "compare out exp"
Jim Meyering [Sat, 3 Dec 2011 14:36:36 +0000 (15:36 +0100)]
tests: two more of these: use "compare exp out", not "compare out exp"

* tests/t7000-scripting.sh: Reverse compare arguments.
* tests/t2310-dos-extended-2-sector-min-offset.sh: Likewise.

12 years agotests: use "compare exp out", not "compare out exp"
Jim Meyering [Tue, 29 Nov 2011 17:05:31 +0000 (18:05 +0100)]
tests: use "compare exp out", not "compare out exp"

Likewise, when an empty file is expected, use "compare /dev/null out",
not "compare out /dev/null". I.e., specify the expected/desired contents
via the first file name.  Prompted by a suggestion from Bruno Haible
in http://thread.gmane.org/gmane.comp.gnu.grep.bugs/4020/focus=29154

Run these commands:

    git grep -l -E 'compare [^ ]+ exp' \
      |xargs perl -pi -e 's/\b(compare) (\S+) (exp\S*)/$1 $3 $2/'
    git grep -l -E 'compare [^ ]+ /dev/null' \
      |xargs perl -pi -e 's,\b(compare) (\S+) (/dev/null),$1 $3 $2,'

12 years agotests: test for partitions on mdraid
Petr Uzel [Sat, 26 Nov 2011 14:45:09 +0000 (15:45 +0100)]
tests: test for partitions on mdraid

* tests/t6100-mdraid-partitions.sh: New file.
* tests/Makefile.am: Run this test.

12 years agolibparted: use ext_range to find out largest possible partition
Petr Uzel [Sat, 26 Nov 2011 14:45:08 +0000 (15:45 +0100)]
libparted: use ext_range to find out largest possible partition

Parted uses /sys/block/DEV/range file to find out how many partitions
can the blockdevice hold and uses this number in its algorithm
for informing the kernel about modified partitions. This works
fine for most devices, however, it fails on partitionable MD arrays,
because these have 1 in range file. Using ext_range should be safer
and work for all devices.

* libparted/arch/linux.c (_device_get_partition_range): Use
/sys/block/DEV/ext_range instead of range sysfs file
* NEWS: Mention the change.

Addresses: http://bugzilla.novell.com/567652

12 years agobuild: gitignore tests/duplicate
Petr Uzel [Sat, 26 Nov 2011 14:47:28 +0000 (15:47 +0100)]
build: gitignore tests/duplicate

.gitignore: Add tests/duplicate.

12 years agomaint: a little defensive programming in a test script
Jim Meyering [Fri, 11 Nov 2011 08:50:51 +0000 (09:50 +0100)]
maint: a little defensive programming in a test script

* tests/gpt-header-munge: Use "local *F;" to limit scope of
file handles.

12 years agotests: skip a test if Perl's Digest::CRC module is not installed
Jim Meyering [Thu, 10 Nov 2011 18:15:29 +0000 (19:15 +0100)]
tests: skip a test if Perl's Digest::CRC module is not installed

* tests/init.cfg (require_perl_digest_crc_): New function.
* tests/t0210-gpt-resized-partition-entry-array.sh: Use it.
Reported by Keshav P R in
http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10530/focus=10589

12 years agotests: fix test for udevadm
Jim Meyering [Thu, 10 Nov 2011 11:14:08 +0000 (12:14 +0100)]
tests: fix test for udevadm

* tests/init.cfg (sector_size_): Fix syntax error in test invocation.

12 years agomaint: "make distcheck" now runs the root-only tests
Jim Meyering [Thu, 10 Nov 2011 11:11:24 +0000 (12:11 +0100)]
maint: "make distcheck" now runs the root-only tests

* Makefile.am (root-check): New overridable variable and rule.
(distcheck-hook): Depend on it.

12 years agobuild: update gnulib submodule to latest
Jim Meyering [Thu, 10 Nov 2011 10:55:23 +0000 (11:55 +0100)]
build: update gnulib submodule to latest

12 years agomaint: adjust the URL that will appear in the generated announcement
Jim Meyering [Thu, 10 Nov 2011 10:54:50 +0000 (11:54 +0100)]
maint: adjust the URL that will appear in the generated announcement

* cfg.mk (url_dir_list): Use this http://ftp.gnu.org/gnu/$(PACKAGE)
for the first link listed in the generated announcement.
announce-gen now provides the faster mirror link automatically.
Remove now-unnecessary release-related URLs.

12 years agobuild: update gnulib submodule to latest
Jim Meyering [Sun, 6 Nov 2011 18:10:49 +0000 (19:10 +0100)]
build: update gnulib submodule to latest

12 years agobuild: stop distributing gzip'd releases; xz is enough
Jim Meyering [Sun, 6 Nov 2011 18:09:56 +0000 (19:09 +0100)]
build: stop distributing gzip'd releases;  xz is enough

* configure.ac (AM_INIT_AUTOMAKE): Add no-dist-gzip.
* NEWS (Build-related): Mention that we're dropping .tar.gz.

12 years agotests: exercise and document the HFS-probe bug fix
Jim Meyering [Sat, 5 Nov 2011 19:49:18 +0000 (20:49 +0100)]
tests: exercise and document the HFS-probe bug fix

Simply zeroing out the total_blocks and block_size members of the
on-disk _HfsMasterDirectoryBlock would provoke a failed assertion
any time parted tried to probe that partition.
* tests/t2500-probe-corrupt-hfs.sh: New script.
* tests/Makefile.am (TESTS): Add it.
* NEWS (Bug fixes): Mention this.

12 years agolibparted: HFS/HFS+ probe: don't let a corrupt FS evoke failed assertion
Brian C. Lane [Fri, 7 Oct 2011 23:53:48 +0000 (16:53 -0700)]
libparted: HFS/HFS+ probe: don't let a corrupt FS evoke failed assertion

* libparted/fs/hfs/probe.c (hfsplus_probe): Add a check on the
search value and reject it if it is negative.
(hfsx_probe): Likewise.
(hfs_and_wrapper_probe): Likewise.
Reported by Flos Lonicerae in http://bugzilla.redhat.com/714758

12 years agotests: t9030 wait for partition removal
Brian C. Lane [Fri, 21 Oct 2011 20:46:53 +0000 (13:46 -0700)]
tests: t9030 wait for partition removal

The removal of the partition may take enough time that the next
mkpart will fail.  Wait for it to be removed.

Remove scsi_debug size and set the end of the partition to 800s so that
it will fit inside the default scsi_debug size of 8M, even when sector
size is 4Kb. This prevents failures on machines with limited memory.

* tests/t9030-align-check.sh: Wait for partition removal and use
a smaller disk.