OSDN Git Service
Petr Uzel [Fri, 11 Mar 2011 12:50:00 +0000 (13:50 +0100)]
parted: rework 'parted print' so that it works with empty disk
'parted $dev print' on a device without a partition table used to fail
with an 'unrecognised disk label' error, without printing the following:
disk model, transport, size, sector size, BIOS geometry
all of which are available, and do not dependent on the partition table.
With this patch, parted prints all of this information (BIOS geometry
only if 'unit cyl' is specified) and reports success even if the disk
does not have a valid partition table.
As a side efect, 'parted $dev print devices/all/list' now prints
information about all the devices, even if $dev does not have a
partition table.
* parted/parted.c (_print_disk_info): New function.
(do_print): Do not immediately fail if the partition table is not
recognized, but print disk information and report success instead.
* NEWS (Changes in behavior): Mention it.
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Petr Uzel [Fri, 11 Mar 2011 12:49:59 +0000 (13:49 +0100)]
parted: factor out disk geometry printing into separate function
* parted/parted.c (_print_disk_geometry): New function.
(do_print): Use _print_disk_geometry.
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Brian C. Lane [Wed, 2 Mar 2011 22:36:33 +0000 (14:36 -0800)]
Remove PED_ASSERT action argument
The action argument was a leftover from when the PED_ASSERT macro was
last changed. This removes that argument from the macro and from all
occurrences of it.
Brian C. Lane [Wed, 2 Mar 2011 22:36:32 +0000 (14:36 -0800)]
Remove PED_ASSERT from dos geometry checking
The CHS geometry values are calculated based on the existing partition
information. The values can't always be calculated, and the partition
may be corrupt so instead of throwing an assertion just return 0 and
carry on.
I left the logic for the PED_ASSERT checks the same so that it is clear
that the logic has not changed, it just returns 0 now.
* libparted/labels/dos.c (probe_partition_for_geom): remove PED_ASSERT
Jim Meyering [Sat, 5 Mar 2011 18:47:05 +0000 (19:47 +0100)]
tests: add a minimal nilfs2 test
* tests/t1700-probe-fs.sh: Adapt to also test nilfs2.
Jim Meyering [Fri, 4 Mar 2011 07:23:01 +0000 (08:23 +0100)]
tests: rename a test script, before extending it to handle nilfs
* tests/t1700-probe-fs.sh: Rename from ...
* tests/t1700-ext-probe.sh: ...this.
* tests/Makefile.am (TESTS): Rename it here, too.
Jiro SEKIBA [Fri, 9 Jul 2010 09:51:56 +0000 (18:51 +0900)]
libparted: add nilfs2 module
* libparted/fs/nilfs2/Makefile.am: New file.
* libparted/fs/nilfs2/nilfs2.c: New file.
(is_valid_nilfs_sb, nilfs2_probe, nilfs2_clobber): New functions.
(ped_file_system_nilfs2_init, ped_file_system_nilfs2_done): Likewise.
(nilfs2_ops, nilfs2_type): Define.
* libparted/fs/Makefile.am (SUBDIRS): Add nilfs2.
* configure.ac (AC_OUTPUT): Add the new Makefile.
* libparted/libparted.c: Declare and use the _init and _done functions.
Add a new fs module to provide following:
- probe nilfs2 filesystem partition
- clobber nilfs2 filesystem partition
The is_valid_nilfs_sb function came from the grub nilfs2 module,
which is written by me and assigned to FSF.
Jim Meyering [Sat, 26 Feb 2011 07:34:02 +0000 (08:34 +0100)]
maint: two files lacked a newline at EOF: add one to each
* include/Makefile.am: Add newline at end of file.
* libparted/fs/jfs/Makefile.am: Likewise.
Jim Meyering [Sat, 26 Feb 2011 06:55:10 +0000 (07:55 +0100)]
tests: t3310-flags: check all gpt boolean flags, too
* tests/t3310-flags.sh: Check gpt as well as msdos flags.
Parametrize mkpart usage.
Accommodate gpt-induced difference in parted's print output
GPT partitions have a name, while msdos ones do not.
This also fixes the "on_and_off" perl flag extraction regexp,
which before was using $1 with no corresponding () group.
Jim Meyering [Sat, 26 Feb 2011 06:24:13 +0000 (07:24 +0100)]
tests: prepare t3310-flags to check gpt boolean flags, too
* tests/t3310-flags.sh: Put a loop around the body of the test,
and factor out the partition table name.
Jim Meyering [Sat, 26 Feb 2011 06:15:05 +0000 (07:15 +0100)]
tests: remove useless commands
* tests/t3310-flags.sh: Remove useless exp-manipulating commands.
Brian C. Lane [Fri, 25 Feb 2011 22:09:19 +0000 (14:09 -0800)]
gpt: add legacy_boot partition flag
Add support for the Legacy BIOS Bootable flag in the GPT
Attribute field. This is used by software like syslinux to
determine which partition to boot when in BIOS mode.
See Page 105, Table 19 Bit 2 of the UEFI Spec 2.3 book.
* doc/C/parted.8: Document legacy_boot.
* doc/parted.texi: Document legacy_boot.
* include/parted/disk.h: Add PED_PARTITION_LEGACY_BOOT flag.
* libparted/disk.c (ped_partition_flag_get_name): Add legacy_boot flag.
* libparted/labels/gpt.c (_parse_part_entry):
(_partition_generate_part_entry, gpt_partition_new):
(gpt_partition_set_flag, gpt_partition_get_flag):
(gpt_partition_is_flag_available): Add legacy_boot flag support.
Brian C. Lane [Fri, 25 Feb 2011 22:09:18 +0000 (14:09 -0800)]
gpt: add partition attribute bits: NoBlockIOProtocol, LegacyBIOSBootable
Add NoBlockIOProtocol and LegacyBIOSBootable flags to the GPT partition
Attributes entry.
Jim Meyering [Sat, 26 Feb 2011 05:45:30 +0000 (06:45 +0100)]
doc: regenerate partprobe .pot and .po files
* doc/C/po/partprobe.8.pot: Slight syntax update induced by newer tool.
* doc/pt_BR/partprobe.8.pt_BR.po: Likewise.
Jim Meyering [Sat, 26 Feb 2011 05:40:46 +0000 (06:40 +0100)]
tests: move test_description= variable to a comment
test-lib.sh-based tests required a test_description= definition.
When testing switched to init.sh, which by convention uses a brief
comment on line 2 instead, some instances were not converted.
* libparted/tests/t1000-label.sh: Put test description on line 2.
Remove now-unused test_description= definition.
* libparted/tests/t2000-disk.sh: Likewise.
* tests/t0220-gpt-msftres.sh: Likewise.
Jim Meyering [Thu, 25 Nov 2010 14:57:00 +0000 (15:57 +0100)]
s390: avoid warnings
* libparted/labels/vtoc.c (vtoc_read_volume_label): Remove decl
of unused var.
* libparted/labels/fdasd.c (fdasd_valid_vtoc_pointer): Return
a value also when successful.
* libparted/labels/dasd.c (dasd_alloc_metadata): Initialize "part"
to NULL solely to avoid a spurious used-uninitialized warning.
Stephen Powell [Thu, 28 Oct 2010 16:18:16 +0000 (18:18 +0200)]
doc: add NEWS entries for s390 fix and improvements
Stephen Powell [Thu, 28 Oct 2010 16:13:07 +0000 (18:13 +0200)]
s390: make DIAG driver work for FBA DASD with block size > 512
In order to make the DIAG driver work for FBA DASD with a block
size greater than 512, I had to make a rather awkward patch to
C function vtoc_read_volume_label in libparted/labels/vtoc.c.
The "right" logic would be "If this is an FBA DASD device
using the DIAG driver, and the effective block size used by the
DIAG driver is greater than 512, then do it this way. Else,
do it the normal way." (Note that when using the FBA driver,
the effective block size is always 512, regardless of the CMS
logical block size stored in the volume label. The DIAG driver,
on the other hand, honors the CMS logical block size.)
The problem is that the information needed to make that decision
has not been provided to the routine (via the parameter list).
So what I ended up doing is assuming the normal way, then if
I don't find a recognized volume label header (VOL1, LNX1,
or CMS1, in EBCDIC), then I assumed that it must be the special
case. So in the special case I end up doing an unnecessary
read. It's a kludge, but it works.
Jim Meyering [Wed, 27 Oct 2010 13:16:30 +0000 (15:16 +0200)]
tests: new script to generate 9-pte-GPT-tables
Jim Meyering [Mon, 25 Oct 2010 19:44:31 +0000 (21:44 +0200)]
cleanup: use verify, not PED_ASSERT to check struct sizes
* libparted/labels/gpt.c: Use compile-time "verify" rather than
run-time PED_ASSERT to ensure struct sizes are as expected.
Stephen Powell [Sat, 8 May 2010 07:39:24 +0000 (09:39 +0200)]
s390: improve/correct DASD support
The long title would be "corrections to partition size and location
calculations for type 1 partitions for s390 dasd".
This could be treated as two separate fixes, one to make corrections
for LDL formatted disks and one to add support for CMS formatted
disks. I see CMS formatted disks as a variant of LDL formatted
disks, with the additional twist that CMS formatted disks can
be reserved or recomped, which LDL formatted disks cannot be.
This affects the size and location of the partition.
With these patches, parted matches the behavior of the Linux kernel
in recognizing partitions on CMS- and LDL-formatted disks, as documented
in the Linux kernel source code in routine fs/partitions/ibm.c.
Calculation of the metadata has also been changed so that parted will
show no free space on such a disk. In some cases there are now two
non-contiguous metadata extents: one at the beginning of the disk and
one at the end.
As before, parted only supports CKD DASD using the ECKD driver.
FBA DASD and CKD DASD using the DIAG driver are still not supported.
In my regression testing I have discovered some problems in the area
of recognizing file system options. However, since I can duplicate
these errors on a version of parted which does not contain my changes,
I have concluded that my changes did not cause this and therefore
this is an unrelated bug.
Jim Meyering [Tue, 22 Feb 2011 15:14:16 +0000 (16:14 +0100)]
maint: update from gnulib
* bootstrap: Update from gnulib.
* tests/init.sh: Likewise.
* gnulib: Update submodule to latest.
Jim Meyering [Mon, 3 Jan 2011 22:59:10 +0000 (23:59 +0100)]
maint: update copyright year ranges to include 2011
Run "make update-copyright".
Jim Meyering [Mon, 3 Jan 2011 22:58:51 +0000 (23:58 +0100)]
maint: update copyright date in parted.texi
* doc/parted.texi: Update copyright date.
Jim Meyering [Thu, 30 Dec 2010 09:01:17 +0000 (10:01 +0100)]
maint: don't hard-code bug-reporting address
* libparted/exception.c (default_handler): Use PACKAGE_BUGREPORT
rather than hard-coding bug-parted@...
* libparted/labels/gpt.c (_parse_header) [DISCOVER_ONLY]: Don't
mention the bug-reporting address explicitly, since ped_exception_throw
is about to do just that.
Jim Meyering [Thu, 16 Dec 2010 14:15:48 +0000 (15:15 +0100)]
maint: correct typos in HACKING
* HACKING: Don't reference grep everywhere. I copied grep's
HACKING and forgot to s/grep/parted/ (slightly different for
the repository, since it's at git.debian.org, not Savannah).
2010-11-25 Jim Meyering <meyering@redhat.com>
Brian C. Lane [Fri, 10 Dec 2010 19:26:53 +0000 (11:26 -0800)]
default to 1MiB alignment when possible
Change the linux_get_optimum_alignment() function to prefer
aligning partitions to PED_DEFAULT_ALIGNMENT (1MiB), if possible.
This helps tools like anaconda better support 4k sector drives.
* include/parted/parted.h (PED_DEFAULT_ALIGNMENT): Define.
* libparted/arch/linux.c (linux_get_optimum_alignment): Adjust.
See comments for details.
* libparted/device.c (ped_device_get_optimum_alignment): Use
PED_DEFAULT_ALIGNMENT rather than hard-coded
1048576.
* tests/t9020-alignment.sh: Adjust expectations to match new behavior.
See http://bugzilla.redhat.com/618255 for details.
Jim Meyering [Mon, 22 Nov 2010 10:56:45 +0000 (11:56 +0100)]
tests: don't rely on "lockfile" program
* tests/t-local.sh (scsi_debug_acquire_lock_): Use mkdir, rather
that lockfile. The latter is not always available.
(scsi_debug_lock_dir_): Rename, now that it's a dir.
(scsi_debug_cleanup_): Remove it with rm -rf.
Fix typo in diag: s/rrmod/rmmod/
Jim Meyering [Mon, 22 Nov 2010 10:53:17 +0000 (11:53 +0100)]
tests: remove vestiges of test-lib.sh
* tests/t-lib-helpers.sh (require_mdadm_): Remove vestiges of
test-lib.sh (aka uses of the "say" and "test_done" functions).
(require_xfs_): Likewise.
Jim Meyering [Mon, 22 Nov 2010 09:50:24 +0000 (10:50 +0100)]
tests: avoid spurious failure
* tests/t6000-dm.sh: Sanitize directory name, to avoid spurious
failure due to e.g., mount-related differences.
Brian C. Lane [Mon, 22 Nov 2010 09:01:56 +0000 (10:01 +0100)]
linux: remove DASD restriction on _disk_sync_part_table
* libparted/arch/linux.c: Include <assert.h>.
(linux_disk_commit): Assert that _have_blkpg returns true
and don't skip _disk_sync_part_table for DASD devices.
Otherwise, when creating a partition on a DASD device,
new /dev/*[12...] device files would not be created.
Also, remove obsolete comment about DevFS.
For details, see http://bugzilla.redhat.com/651478
and http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10191
Jim Meyering [Sat, 20 Nov 2010 15:03:16 +0000 (16:03 +0100)]
build: update gnulib submodule to latest
avoid new syntax-check failures
* .x-sc_cross_check_PATH_usage_in_tests: New file.
* .x-sc_bindtextdomain: New file.
Jim Meyering [Sat, 20 Nov 2010 15:02:23 +0000 (16:02 +0100)]
tests: adjust cleanup_ handler to work with init.sh
* tests/init.cfg (cleanup_, cleanup_fn_, cleanup_final_): Define.
* tests/t-local.sh (cleanup_final_): Use this to ensure that we
always release the lock and run rmmod. Overriding the trap did not
do the job.
* libparted/tests/t2100-zerolen.sh: Use cleanup_fn_, not cleanup_.
* tests/t1100-busy-label.sh: Likewise.
* tests/t1101-busy-partition.sh: Likewise.
* tests/t4100-dvh-partition-limits.sh: Likewise.
* tests/t4100-msdos-partition-limits.sh: Likewise.
* tests/t6000-dm.sh: Likewise.
* tests/t8000-loop.sh: Likewise.
Jim Meyering [Sat, 20 Nov 2010 13:48:40 +0000 (14:48 +0100)]
tests: t3000-resize-fs.sh: don't expect fs-op warning
* tests/t3000-resize-fs.sh: Don't expect fs-op warning.
The testing framework now suppresses it.
Jim Meyering [Fri, 19 Nov 2010 10:36:44 +0000 (11:36 +0100)]
tests: t-lvm.sh (lvm_init_root_dir_): Fix it to use $test_dir_
Jim Meyering [Sat, 20 Nov 2010 11:35:59 +0000 (12:35 +0100)]
tests: remove t-lib.sh
* tests/t-lib.sh: Remove file. No longer used.
* tests/Makefile.am (EXTRA_DIST): Remove t-lib.sh.
* tests/t-lib-helpers.sh: Don't mention this file name.
* tests/t-local.sh: Likewise.
Jim Meyering [Fri, 19 Nov 2010 10:30:45 +0000 (11:30 +0100)]
tests: switch from t-lib.sh to init.sh
* tests/init.cfg: Source t-local.sh.
* tests/t-local.sh: Replace trap so that we always run
scsi_debug_cleanup_, regardless of the cleanup_ function.
Replace each snippet like this:
-if test "$VERBOSE" = yes; then
- set -x
- parted --version
-fi
-
-: ${srcdir=.}
-. $srcdir/t-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../parted
Use this command (LHS elided, because it was too long):
git grep -l 'srcdir/t-lib.sh'|xargs perl -p0i -e \
's!...!. "\${srcdir=.}/init.sh"; path_prepend_ ../parted\n!'
* tests/t3310-flags.sh: Adjust manually, since the snippet
didn't quite match.
Jim Meyering [Fri, 19 Nov 2010 08:12:58 +0000 (09:12 +0100)]
tests: remove test-lib.sh
* tests/test-lib.sh: Remove file. No longer used.
* tests/Makefile.am (EXTRA_DIST): Remove test-lib.sh.
(old-init.sh): Remove rule and associated uses.
* tests/lvm-utils.sh (init_root_dir_): Switch to test_dir_,
since that is now the only variable that remains.
Jim Meyering [Sat, 20 Nov 2010 11:32:19 +0000 (12:32 +0100)]
tests: remove fail=0 initializations
Now, this is done in init.sh.
Jim Meyering [Fri, 19 Nov 2010 08:10:36 +0000 (09:10 +0100)]
tests: libparted/tests: use init.sh, not test-lib.sh
Jim Meyering [Thu, 18 Nov 2010 17:09:30 +0000 (18:09 +0100)]
tests: make lvm-utils.sh usable also from init.sh-using tests
* tests/lvm-utils.sh: Use fail_, not error for diagnostics.
The former also works in init.sh-using scripts.
(init_root_dir_): Use test_dir_ if $test_dir_rand_ is not set.
Jim Meyering [Thu, 18 Nov 2010 16:51:59 +0000 (17:51 +0100)]
tests: new function required for t2100-zerolen.sh
* tests/t-lib-helpers.sh (device_mapper_required_): New function.
Jim Meyering [Thu, 18 Nov 2010 15:55:11 +0000 (16:55 +0100)]
tests: convert t5000-tags.sh
Jim Meyering [Thu, 18 Nov 2010 15:47:32 +0000 (16:47 +0100)]
tests: t-lib-helpers.sh: don't discard require_dvhtool_ stderr/stdout
Jim Meyering [Thu, 18 Nov 2010 15:34:57 +0000 (16:34 +0100)]
tests: dvhtool: use skip_, not skip
Jim Meyering [Thu, 18 Nov 2010 15:33:43 +0000 (16:33 +0100)]
tests: t4200-partprobe.sh: convert
Jim Meyering [Thu, 18 Nov 2010 15:29:34 +0000 (16:29 +0100)]
tests: t-lib-helpers.sh (require_dvhtool_): New function.
Jim Meyering [Thu, 18 Nov 2010 15:26:15 +0000 (16:26 +0100)]
tests: convert t4000-sun-raid-type.sh
Jim Meyering [Thu, 18 Nov 2010 14:01:19 +0000 (15:01 +0100)]
tests: move more functions to t-lib-helpers.sh
Jim Meyering [Thu, 18 Nov 2010 14:01:01 +0000 (15:01 +0100)]
tests: convert t7000 to init.sh
Jim Meyering [Thu, 18 Nov 2010 13:40:13 +0000 (14:40 +0100)]
tests: t-lib-helpers: copy emit_superuser_warning from test-lib.sh
Jim Meyering [Thu, 18 Nov 2010 13:39:24 +0000 (14:39 +0100)]
tests: t0000: convert to use init.sh
Jim Meyering [Thu, 18 Nov 2010 12:29:15 +0000 (13:29 +0100)]
tests: convert t1101-busy-partition.sh
* tests/t1101-busy-partition.sh: Convert from t-lib.sh to init.sh.
Jim Meyering [Thu, 18 Nov 2010 12:19:52 +0000 (13:19 +0100)]
tests: convert t4100-msdos-partition-limits.sh
* tests/t4100-msdos-partition-limits.sh: Likewise.
Jim Meyering [Thu, 18 Nov 2010 12:06:57 +0000 (13:06 +0100)]
tests: convert t4100-dvh-partition-limits.sh to use init.sh
* tests/t4100-dvh-partition-limits.sh: Convert.
Jim Meyering [Thu, 18 Nov 2010 11:26:18 +0000 (12:26 +0100)]
tests: convert t4100-msdos-starting-sector.sh
* tests/t4100-msdos-starting-sector.sh: Use init.sh.
Jim Meyering [Thu, 18 Nov 2010 11:16:14 +0000 (12:16 +0100)]
tests: convert t0220 to use init.sh
* tests/t0220-gpt-msftres.sh: Convert to use init.sh.
Jim Meyering [Thu, 18 Nov 2010 11:18:42 +0000 (12:18 +0100)]
tests: extract t-lib.sh functions for use via init.sh
Currently there are three test frameworks in use:
- test-lib.sh: old, don't use this framework any more;
I found it too hard to use and debug.
- t-lib.sh: newer, I had converted most tests to use this
- init.sh: newest: successor of t-lib.sh, the master copy
of which now resides in gnulib. All new tests should use
this framework.
* tests/t-lib-helpers.sh: New file, extracted from t-lib.sh,
so that init.cfg can source these functions, too.
* tests/t-lib.sh: Source it.
* tests/init.cfg: Source it from here, too.
* tests/Makefile.am (EXTRA_DIST): Add t-lib-helpers.sh.
Jim Meyering [Thu, 18 Nov 2010 10:33:18 +0000 (11:33 +0100)]
tests: remove unused function: skip_if_
Jim Meyering [Thu, 18 Nov 2010 10:30:03 +0000 (11:30 +0100)]
tests: global subst: s/skip_test_/skip_/
git grep -l skip_test_|xargs perl -pi -e 's/skip_test_/skip_/'
Jim Meyering [Thu, 18 Nov 2010 10:27:29 +0000 (11:27 +0100)]
maint: remove unused test function
* tests/t-lib.sh (require_built_): Remove unused function.
It also happened to use skip_, which we're about to make a function.
Jim Meyering [Thu, 18 Nov 2010 09:22:56 +0000 (10:22 +0100)]
tests: avoid race condition in t3000-resize
Without the 1-second sleep, this root-only test would
fail about 50% of the time for me.
* tests/t3000-resize-fs.sh (device_sectors_required): Sleep
one more second after ${dev}1 appears, so that subsequent
commands are more predictable.
Split a long line.
Jim Meyering [Thu, 18 Nov 2010 09:59:48 +0000 (10:59 +0100)]
tests: t2100-mkswap.sh: convert to init.sh
* tests/t2100-mkswap: Likewise.
Jim Meyering [Thu, 18 Nov 2010 09:06:37 +0000 (10:06 +0100)]
tests: convert t1100 to use init.sh
* tests/t1100-busy-label.sh: Convert to use init.sh
* tests/init.cfg (require_erasable_): New function, mostly
copied from test-lib.sh.
Jim Meyering [Thu, 18 Nov 2010 13:39:42 +0000 (14:39 +0100)]
tests: init.cfg: copy envvar setings from testlib.sh:
Unset TERM and CDPATH; sanitize LC_ALL, TZ, LANG, and set
PARTED_SUPPRESS_FILE_SYSTEM_MANIPULATION_WARNING=1.
* tests/t1101-busy-partition.sh: Expect no output, now that we set
PARTED_SUPPRESS_FILE_SYSTEM_MANIPULATION_WARNING=1.
Jim Meyering [Thu, 18 Nov 2010 06:36:52 +0000 (07:36 +0100)]
maint: update init.sh and bootstrap from gnulib
* tests/init.sh: Update from gnulib.
* bootstrap: Likewise.
Jim Meyering [Fri, 19 Nov 2010 18:32:08 +0000 (19:32 +0100)]
doc: also mention KiB, MiB, GiB and TiB suffixes
* doc/parted.texi (unit): Also mention KiB, MiB, GiB and TiB.
Colin Watson [Wed, 17 Nov 2010 15:14:50 +0000 (15:14 +0000)]
libparted: ignore zero-length devices
* bootstrap.conf (gnulib_modules): Add xstrtoll.
* configure.ac: Create DYNAMIC_LOADING output variable.
* libparted/arch/linux.c (_device_get_length): Return the value of
PARTED_TEST_DEVICE_LENGTH if set in the environment, strictly for use by
the test suite.
(init_generic): If geometry probing fails because the device was
zero-length, return quietly rather than throwing an exception. This has
been observed in the wild with cciss devices, and it's difficult for
partitioners to tell the difference between that and more serious
errors.
* libparted/tests/Makefile.am (TESTS): Add t2100-zerolen.sh.
(check_PROGRAMS): Add zerolen.
(zerolen_SOURCES): Add.
(TESTS_ENVIRONMENT): Add DYNAMIC_LOADING and ENABLE_DEVICE_MAPPER.
* libparted/tests/t2100-zerolen.sh: New file.
* libparted/tests/zerolen.c: New file.
* tests/test-lib.sh (wait_for_dev_to_appear_): New function, copied from
tests/t-local.sh.
* NEWS (Bug fixes): Mention it.
Jim Meyering [Tue, 9 Nov 2010 09:25:36 +0000 (10:25 +0100)]
dos: fix a bug affecting very small devices (smaller than 1 cylinder)
This bug was introduced in commit
c79d91ec, "dos: accommodate very
small devices (useful for testing)".
* libparted/labels/dos.c (_primary_constraint): The bug was to
skip setting start_geom for small devices. That led to a used-
uninitialized bug in the subsequent ped_constraint_new call.
The fix is to relax the constraint to use a starting sector of "1",
if necessary. Report and diagnosis by Jean-Christian de Rivaz in
http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10178
* NEWS (Bug fixes): Mention it.
Jim Meyering [Sun, 10 Oct 2010 17:01:52 +0000 (19:01 +0200)]
maint: don't use obsolete gnulib modules
* bootstrap.conf (gnulib_modules): Use calloc-gnu, malloc-gnu
and realloc-gnu modules, rather than calloc, malloc and realloc.
The shorter-named modules are now deprecated.
Jim Meyering [Sat, 9 Oct 2010 13:24:48 +0000 (15:24 +0200)]
maint: describe policy on copyright year number ranges
* README: Mention coreutils' long-standing policy on use of M-N
ranges in copyright year lists. Requested by Richard Stallman.
Jim Meyering [Sun, 10 Oct 2010 15:59:27 +0000 (17:59 +0200)]
build: update gnulib submodule to latest, and update bootstrap
* bootstrap: update from gnulib
Petr Uzel [Mon, 23 Aug 2010 12:29:46 +0000 (14:29 +0200)]
build: suggest libuuid from util-linux-ng package
* configure.ac: libuuid was moved from e2fsprogs to
util-linux-ng-2.16. Because distributions now often
build e2fsprogs without libuuid support, suggest installing
libuuid from util-linux-ng if it is missing, not from e2fsprogs.
Colin Watson [Thu, 19 Aug 2010 10:07:20 +0000 (11:07 +0100)]
libparted: remove limits on loop labels
There's no reason to impose any particular limit on loop labels, since
they just represent a single large partition. Sector counts over 2^32
are needed for large RAID arrays. Change the limit to 2^64 since that's
the upper limit imposed by libparted and it saves us implementing the
limit functions separately. This bug appears to have been introduced
by commit
2dbc645c.
* libparted/labels/pt-limit.gperf: Change limits on "loop" to 2^64.
* tests/t9021-maxima.sh: Update for the new loop limit.
* NEWS (Bug fixes): Mention it.
Jim Meyering [Wed, 18 Aug 2010 22:52:02 +0000 (18:52 -0400)]
avoid non-srcdir "make check" failure
* tests/Makefile.am (EXTRA_DIST): Add init.cfg.
The failure was introduced by commit
6f7c0f12.
Jim Meyering [Wed, 18 Aug 2010 22:39:53 +0000 (18:39 -0400)]
build and tests: update bootstrap and init.sh from gnulib
* tests/init.sh: Update from gnulib.
* bootstrap: Likewise.
Jim Meyering [Wed, 18 Aug 2010 21:41:43 +0000 (17:41 -0400)]
build: update gnulib submodule to latest
Hans de Goede [Tue, 20 Jul 2010 10:17:53 +0000 (12:17 +0200)]
linux: recognize scsi disks with a high major number (128-135)
* libparted/arch/linux.c (SCSI_BLK_MAJOR): Recognize high major number.
Jim Meyering [Thu, 15 Jul 2010 00:16:14 +0000 (19:16 -0500)]
libparted: avoid regression when processing a whole-disk FAT partition
Without this change, we would improperly classify a whole-disk partition
containing a FAT file system as a DOS partition table with no partitions.
Introduced by commit
d732a2b7 on 2008-05-28.
* libparted/labels/dos.c (maybe_FAT): New function.
(msdos_probe): Use it.
Reported by ChenMin in
http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10115
* NEWS (Bug fixes): Mention it.
* tests/t3400-whole-disk-FAT-partition.sh: New file. Test for the bug.
* tests/Makefile.am (TESTS): Add it.
Jim Meyering [Sat, 17 Jul 2010 12:20:54 +0000 (07:20 -0500)]
tests: use init.cfg; required for init.sh-using tests
* tests/init.cfg: New file.
(require_512_byte_sector_size_): Slightly different function
than the one in test-lib.sh.
* tests/init.cfg: New file.
Jim Meyering [Wed, 14 Jul 2010 21:39:05 +0000 (16:39 -0500)]
build: update gnulib submodule to latest
Jim Meyering [Sat, 17 Jul 2010 00:21:44 +0000 (19:21 -0500)]
maint: remove trailing blank
* tests/t1101-busy-partition.sh: Remove trailing blank.
Otavio Salvador [Tue, 29 Jun 2010 17:22:34 +0000 (14:22 -0300)]
tests: update resize-fs to use wait_for_dev_to_appear_
* t3000-resize-fs.sh: rely on wait_for_dev_to_appear_ to wait for the
device to be crated.
Otavio Salvador [Tue, 29 Jun 2010 12:51:03 +0000 (09:51 -0300)]
tests: rely on require_scsi_debug_module_ to modprobe scsi_debug module
* t2310-dos-extended-2-sector-min-offset.sh: remove explicit modprobe
since it is done by require_scsi_debug_module_.
* t3200-type-change.sh: likewise.
* t9020-alignment.sh: likewise.
* t9030-align-check.sh: likewise.
* t9040-many-partitions.sh: likewise.
Otavio Salvador [Mon, 28 Jun 2010 22:45:51 +0000 (19:45 -0300)]
tests: add one: try to remove a busy partition
This test tries to reproduce the issue reported in Debian bug #582818[1].
1. http://bugs.debian.org/582818
Basically it does:
* create two primary partitions
* mount the second one
* remove the first (must work)
* try to remove the second (must fail)
* tests/t1101-busy-partition.sh: new file.
* tests/Makefile.am (TESTS): add the new test in check target.
Otavio Salvador [Sat, 26 Jun 2010 22:23:16 +0000 (19:23 -0300)]
tests: skip loop-clobber-infloop if mkswap cannot be found
* tests/t0400-loop-clobber-infloop.sh: Skip the test is case of mkswap
cannot be found.
Jim Meyering [Sat, 26 Jun 2010 06:59:18 +0000 (08:59 +0200)]
build: update gnulib submodule to latest
* bootstrap: Update from gnulib.
* tests/init.sh: Likewise.
Colin Watson [Tue, 15 Jun 2010 18:49:40 +0000 (19:49 +0100)]
sun: revert "implement disk flag operations"
This reverts the libparted/labels/sun.c part of
723ea23c5df68cbe67d1f518ef484f4c77f516fa. Sun disk labels do
not appear to be able to handle non-cylinder alignment
(http://bugs.debian.org/579948).
* libparted/labels/sun.c: Revert.
Jim Meyering [Sat, 26 Jun 2010 07:22:59 +0000 (09:22 +0200)]
tests: adjust sun-partition-creating test to conform
* tests/t4000-sun-raid-type.sh: Adjust partition size so the
end falls on a cylinder boundary.
Jim Meyering [Fri, 28 May 2010 19:02:45 +0000 (21:02 +0200)]
maint: update README-release
* README-release: Update to match the template used for diffutils,
coreutils, etc.
Jim Meyering [Fri, 28 May 2010 18:49:04 +0000 (20:49 +0200)]
maint: add gettext to list of bootstrapped-with tools in announcement
* cfg.mk (bootstrap-tools): Add gettext to the list.
Jim Meyering [Fri, 28 May 2010 18:33:10 +0000 (20:33 +0200)]
post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
Jim Meyering [Fri, 28 May 2010 18:26:06 +0000 (20:26 +0200)]
version 2.3
* NEWS: Record release date.
Jim Meyering [Fri, 28 May 2010 18:24:45 +0000 (20:24 +0200)]
doc: regenerate two files using gettext-0.18
* doc/pt_BR/partprobe.8.pt_BR.po: Regenerate with gettext-0.18.
* doc/C/po/partprobe.8.pot: Likewise.
Jim Meyering [Fri, 28 May 2010 17:55:34 +0000 (19:55 +0200)]
build: require gettext-0.18 after all, because
since gnulib is pulling in m4/gettext.m4 from 0.18, and there's
a cross-check between that file and po/Makefile.in.in, it's easiest
simply to require 0.18 of those who run build tools. Otherwise,
requiring 0.17, build-from-git would fail due to the mismatch:
0.17 in Makefile.in.in and 0.18 in m4/gettext.m4.
* configure.ac (AM_GNU_GETTEXT_VERSION): Require gettext 0.18.
Jim Meyering [Fri, 28 May 2010 15:27:52 +0000 (17:27 +0200)]
build: update gnulib submodule to latest
Jim Meyering [Fri, 28 May 2010 15:26:45 +0000 (17:26 +0200)]
maint: use the do-release-commit-and-tag module from gnulib
* bootstrap.conf (gnulib_modules): Add do-release-commit-and-tag.
Petr Uzel [Fri, 28 May 2010 15:11:05 +0000 (17:11 +0200)]
doc: fix a typo
* doc/parted.texi: s/onstraints/constraints/
Petr Uzel [Fri, 28 May 2010 14:42:20 +0000 (16:42 +0200)]
parted: do_align_check returns always 1 in interactive mode
* parted/parted.c (do_align_check): Always return 1 in interactive mode.
Jim Meyering [Thu, 27 May 2010 14:32:34 +0000 (16:32 +0200)]
build: really use gettext-0.17
* configure.ac: Correct previous change to use 0.17, not 0.18,
since gettext-0.18 is new enough that it makes building from git
a little too inconvenient. Spotted by Petr Uzel.