summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'baserock/pedroalvarez/v3.2-gitmodules' into baserock/v3.2baserock/v3.2Pedro Alvarez2015-05-181-1/+1
|\ | | | | | | | | Reviewed-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk> Reviewed-by: Francisco Redondo Marchena <francisco.marchena@codethink.co.uk>
| * Update .gitmodules to point at upstream:gnulibbaserock/pedroalvarez/v3.2-gitmodulesPedro Alvarez2015-05-181-1/+1
|/
* Allow building without device-mapperTiago Gomes2015-04-091-1/+6
|
* version 3.2v3.2Phillip Susi2014-07-281-1/+1
| | | | * NEWS: Record release date.
* Bump library REVISION number for releasePhillip Susi2014-07-272-2/+2
|
* tests: don't require en_US locale in t0251-gpt-unicode.shPhillip Susi2014-07-271-1/+1
| | | | | Switch from en_US.UTF-8 to C.UTF-8 so the test does not fail on systems that do not have the en_US locale installed.
* maint: correct a POT-file updating ruleJim Meyering2014-06-231-0/+1
| | | | | * doc/C/Makefile.am (updatepo): If there is no po/$name.pot, create an empty one. Reported by Philip Susi.
* tests: fix t9020-alignment.shv3.1.90Phillip Susi2014-06-151-1/+1
| | | | | | This test was refering to print-alignment by absolute path, which broke building with a different object directory, causing make distcheck to fail.
* Document resizepart commandPhillip Susi2014-06-152-0/+20
|
* parted: Add stub resize command for backward compatibilityPhillip Susi2014-06-151-0/+16
| | | | | | To make sure that older scripts trying to use the resize command do not accidentally run the new resizepart command by mistake, this undocumented stub command will throw an error if called.
* parted: Allow undocumented commandsPhillip Susi2014-06-151-0/+2
| | | | | | Have command_print_summary print nothing if the command summary is NULL. This allows for a command to be registered, but not documented in the output of help.
* parted: make _partition_warn_busy actually a warning instead of an errorPhillip Susi2014-06-155-12/+17
| | | | | | This function was throwing a PED_EXCEPTION_ERROR with only the PED_EXCEPTION_CANCEL option. Converted to a PED_EXCEPTION_WARNING with the option to continue anyhow.
* libparted: Add support for partition resizePhillip Susi2014-06-152-33/+177
| | | | | | | | When resizing a partition ( same partition number, same start sector, different end sector ), try to use the new BLKPG_RES_PARTITION request to update the kernel partition table with the new size. Also handle resizing devmapper targets.
* tests: excersise resize commandPetr Uzel2014-06-152-0/+90
| | | | a lot of TODOs
* parted: add resizepart commandPetr Uzel2014-06-152-0/+88
| | | | | Add resizepart command to resize ( change the end position ) an existing partition. Note that it does nothing to a filesystem in the partition.
* Fix python test scripts for distributionBrian C. Lane2014-06-155-5/+8
| | | | | | | | | | | | | | | | make distcheck was failing because these scripts were not being included. Make them both executable and and add the path to the tests that use them. They also need to be included in the distribution so update Makefile.am * tests/Makefile.am: Add python test scripts * tests/gpt-header-move.py: rename to gpt-header-move and make it executable * tests/msdos-overlap.py: rename to overlap.py * tests/t0282-gpt-move-backup.sh: add path to scripts and use new name * tests/t0283-overlap-partitions.sh: same
* tests: check name when duplicatingBrian C. Lane2014-06-151-4/+29
| | | | | | | | | | Create a second partition with a name when supported by the disk label. Check to make sure that the duplicate has copied over the name. The goal with this was to try to catch the bug fixed by the previous commit but I was unable to make it fail. But this should improve our test coverage anyway. * tests/duplicate.c: Add a partition name test.
* libparted: Fix part dupe with empty nameBrian C. Lane2014-06-151-2/+4
| | | | | | It was setting the original translated_name to 0, not the new copy. * libparted/labels/gpt.c (gpt_partition_duplicate): fix empty name
* tests: use test's "=" operator, not "=="Jim Meyering2014-05-281-1/+1
| | | | * tests/t1700-probe-fs.sh: Avoid "make syntax-check" error: s/==/=/
* tests: avoid false-positive failure due to symlinkJim Meyering2014-05-281-2/+8
| | | | | | * tests/t6000-dm.sh (sanitize): Helper function. Before this change, this test would fail due to difference between absolute name and symlink-including names in "parted print" output
* maint: fix "make syntax-check" nitsJim Meyering2014-05-289-12/+10
| | | | | | | | | | | | | | | | * doc/parted.texi: Update copyright year to 2014. * tests/gpt-header-move.py: Remove empty line at EOF. * tests/t0281-gpt-grow.sh: Correct reversed args to compare. * tests/t0282-gpt-move-backup.sh: Likewise. * libparted/labels/gpt.c (gpt_partition_set_name): Change "Can not" to "failed to" in diagnostic. (gpt_partition_get_name): Likewise. * tests/t1102-loop-label.sh (dev): Remove trailing space in here document that creates expected output, and strip that same trailing space from actual output. * libparted/fs/jfs/jfs.c: Do not cast alloca return value. * libparted/fs/reiserfs/reiserfs.c: Likewise. * libparted/fs/xfs/xfs.c: Likewise.
* tests: Use mkfs.xfs to create files (#1101112)Brian C. Lane2014-05-273-6/+9
| | | | | | | | | | On s390 there is a bug with mkfs.xfs and pre-existing files. Work around it by creating the file directly with mkfs.xfs. This also works on other arches. * tests/t1700-probe-fs.sh: Check for xfs and use direct file creation * tests/t4100-dvh-partition-limits.sh: Use mkfs.xfs -dfile * tests/t4100-msdos-partition-limits.sh: Use mkfs.xfs -dfile
* tests: Add ntfs vfat hfsplus to t1700 probe testBrian C. Lane2014-05-271-6/+13
| | | | | | | | Add some new filesystems to test. Adjust how mkfs.* tests, since some of them don't support -V, and add fsname so that the printed filesystem name doesn't have to match the type. * tests/t1700-probe-fs.sh: Add new filesystems to test
* maint: run "make update-copyright"Jim Meyering2014-05-25221-221/+221
|
* maint: remove doubled word: s/on on/on/Jim Meyering2014-05-251-1/+1
| | | | * NEWS: Remove doubled-word detected by "make syntax-check".
* gnulib: update submodule to latestJim Meyering2014-05-252-2/+10
| | | | | * gnulib: Update module to latest. * bootstrap: Update from gnulib.
* libparted: mac: support sector size > 512 correctlySergei Antonov2014-05-252-38/+23
| | | | | | | | | | | | | | | | | | | | This patch fixes several problems found when trying to do Apple Partition Map on a 4K-sector iPod. The problems happened because of unneeded conversion between physical sectors and 512-byte units. For devices with sector 512 the conversion did no harm, for others it did. List of problems (all are gone with the patch): * Partition in OS X, connect to Linux, run "parted <dev> print". "Error: Can't have a partition outside the disk!" is shown. Every partition is displayed 8 times (4k/512) bigger its real size. * Exec "mktable mac", connect to OS X. The drive's partitioning scheme is not recognized. * mkpart creates partitions 8 times (4k/512) smaller than requested. Signed-off-by: Sergei Antonov <saproj@gmail.com>
* tests: test loop labelsPhillip Susi2014-05-222-0/+105
| | | | Verify previous fixes to loop labels.
* libparted: don't trash filesystem when writing loop labelPhillip Susi2014-05-221-1/+2
| | | | | | | | | If you deleted the fake partition on a loop label, loop_write() would write the loop signature to the device, zeroing out all other bytes in the first sector. When the disk contained an ext[234] filesystem and was using 2k sectors, this would trash the super block residing in the 1-2kb part of the sector causing the disk to become unrecognized. Instead, read the existing sector and only modify the first few bytes that contain the loop label.
* libparted: give correct partition device name on loop labelsPhillip Susi2014-05-222-2/+11
| | | | | | ped_partition_get_path() was returning "/dev/foo1" instead of "/dev/foo" on loop labels. This caused gparted to run tools like mkfs on a device node that did not actually exist.
* partprobe: do not skip loop labelsPhillip Susi2014-05-222-3/+4
| | | | | Partprobe was not syncing loop labels. This resulted it failing to remove existing partitions when switching to a loop label.
* libparted: don't create partition on loop labelPhillip Susi2014-05-222-0/+7
| | | | | | The loop label represents an unpartitioned disk, but creates a dummy partition to represent the whole disk. This dummy partition was actually being loaded into the kernel. Don't do that.
* libparted: fix loop labels to not vanishPhillip Susi2014-05-222-29/+30
| | | | | | | | | | | | | | | | The loop label type was using the existence of a partition as a proxy for a filesystem being detected, and loop_write() would try to write a loop signature if there was no filesystem, and erase it if there was. Because of this, creating a partition without writing a filesystem to it caused loop_write to erase the loop label. There seems to be no reason to bother erasing the loop label if it is still present along with a filesystem signature, so don't bother with this, and actually check to see if a filesystem is detected in the partition rather than using the existence of a partition to decide if writing the loop signature is needed. Finally, since there is no way to preserve the existence of a partition with no filesystem in it, have loop_read() always create a partition, even if no filesystem is detected.
* libparted: remove all old partitions, even if new label allows lessPhillip Susi2014-05-222-2/+12
| | | | | | | | We were limiting partition sync operations to the lesser number allowed by the device, or the label. This meant that when creating a new label over an old label that had more partitions than the new one allows, the higher partitions would not be removed. Use the greater of the two values for the remove pass, and the lesser for the add.
* libparted: remove old partitions *first* before adding new onesPhillip Susi2014-05-223-22/+72
| | | | | | | | "libparted: avoid disturbing partitions" put the remove of the old partition in second pass. If you simultaneously removed partitions 1 and 2, and created a new partition #1 that overlapped the previous second partition, the sync would fail because it would try to create the new, larger partition #1 before removing the old partition #2.
* libparted: don't detect fat and ntfs boot sectors as dos MBRPhillip Susi2014-05-223-1/+33
| | | | | | | | fat and ntfs boot sectors are very similar to an MBR so if you had one of these filesystems on an unpartitioned disk, parted detected them as a dos partition table. Have the dos label code call the fat and ntfs filesystem probes and if they recognize the sector ( their tests are more stringent ) then don't claim it as a dos label.
* parted: don't reload partition table on every commandPhillip Susi2014-05-229-175/+170
| | | | | | | | | | | | gpt was using a static local variable to suppress repeatedly reporting an error if you chose to ignore it. This is incorrect as the variable is global to all disks, and ignoring the error on one should not suppress its reporting on another. Moving the flag to the PedDisk object made it effectively useless because parted was destroying the PedDisk and reloading the partition table on every command. Parted has been reworked to cache the PedDisk once loaded, and only discard it when changing disks, or creating a new disklabel.
* libparted: fix fat resizePhillip Susi2014-05-222-5/+11
| | | | | The changes to fix filesystem detection on non 512 byte sector sizes broke fat filesystem resizing.
* GPT strings are UCS-2LE not UTF-16Brian C. Lane2014-05-192-13/+11
| | | | | | | | | | There was a problem using UTF-16, it was writing the Byte Order Mark before the string which caused problems with older versions of parted reading the partition name. The test was skipping these 2 bytes when checking the written string. * libparted/labels/gpt.c: Switch to UCS-2LE for GPT Partition names * tests/t0251-gpt-unicode.sh: Update the test
* Update NEWS with new DASD features.Brian C. Lane2014-04-291-0/+6
| | | | * NEWS: New DASD support
* dasd: avoid usage of uninitialized dataPetr Uzel2014-04-291-1/+1
| | | | | | | | | In ped_partition_new(), disk_specific data of PedPartition structure is allocated (via dasd_partition_new()). This data is later used uninitialized in dasd_partition_set_system(). * libparted/labels/dasd.c (dasd_partition_new): Zero out allocated disk_specific data.
* libparted: mklabel to support EDEV DASDNageswara R Sastry2014-04-291-13/+15
| | | | | | | | Fixed Block Access (FBA) DASDs are mainframe-specific disk devices which are layed out as a sequence of 512-byte sectors. This patch adds support for mklabel to properly handle FBA devices. Signed-off-by: Nageswara R Sastry <rnsastry@linux.vnet.ibm.com>
* libparted: Avoid dasd as default disk type while probeNageswara R Sastry2014-04-292-1/+6
| | | | | | | This patch avoids setting 'dasd' as a default disk type for 'disk image file' at the time of probe. Signed-off-by: Nageswara R Sastry <rnsastry@linux.vnet.ibm.com>
* libparted: mklabel to support EAV DASDNageswara R Sastry2014-04-292-3/+90
| | | | | | | | Extended Address Volume (EAV) DASDs are ECKD DASDs with more than 65520 cylinders. This patch adds support for mklabel to properly handle unformatted EAV DASDs. Signed-off-by: Nageswara R Sastry <rnsastry@linux.vnet.ibm.com>
* libparted: add support for EAV DASD partitionsNageswara R Sastry2014-04-295-112/+436
| | | | | | | | | | | | | Extended Address Volume (EAV) DASDs are ECKD DASDs with more than 65520 cylinders. This patch adds support for recognizing and modifying partitions on EAV DASDs to Parted. The changes are based on the EAV support added to version 1.8.1 [1] of the s390-tools package. [1] http://www.ibm.com/developerworks/linux/linux390/s390-tools-1.8.1.html Signed-off-by: Nageswara R Sastry <rnsastry@linux.vnet.ibm.com> Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
* libparted: add support for implicit FBA DASD partitionsNageswara R Sastry2014-04-293-9/+61
| | | | | | | | | | | | | | | | | | | | Fixed Block Access (FBA) DASDs are mainframe-specific disk devices which are layed out as a sequence of 512-byte sectors. In contrast to ECKD DASDs, these disks do not require formatting and resemble the LBA layout of non-mainframe disks. Despite this resemblance, the Linux kernel applies special handling during partition detection for FBA DASDs, resulting in a single, immutable partition being reported. While actual FBA DASD hardware is no longer available, the z/VM hypervisor can simulate FBA DASD disks, backed by either ECKD or SCSI devices. This patch adds support for recognizing FBA DASD partitions to parted. Signed-off-by: Nageswara R Sastry <rnsastry@linux.vnet.ibm.com> Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
* Fix filesystem detection on non 512 byte sectorsPhillip Susi2014-04-1827-275/+148
| | | | | | Enable probing for filesystems with non 512 byte sectors, and fix up each filesystem to correctly handle that. Remove unused field from the fs type structure listing acceptable sector sizes.
* tests: fix t2310-dos-extended-2-sector-min-offset.shPhillip Susi2014-04-181-6/+3
| | | | | This test was ignoring the requested sector size and always using 512 bytes per sector. Fix it to use the requested sector size.
* tests: fix t1700Phillip Susi2014-04-181-0/+1
| | | | | | | | bb181a7e: "tests: Use force for xfs in t1700 and a larger file" caused the previous filesystem signatures to be left in the image file causing mkfs.nilfs2 to complain that there is already an xfs filesystem there, and hang the test suite waiting for an answer to proceed or not. Remove the file between filesystems so it is recreated cleanly again.
* libparted: remove last_usable_if_grownPhillip Susi2014-04-181-1/+1
| | | | | | Commit 3398e82a: "libparted: Use common function to calculate PTE sectors" removed usage of the last_usable_if_grown variable, resulting in an error because it is now unused but still defined.