summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* tests: Remove trailing blanksBrian C. Lane2022-03-251-1/+1
|
* parted: Fix config.h include in jsonwrt.cBrian C. Lane2022-03-251-1/+1
|
* libparted: Fix syntax-check sc_avoid_if_before_free errorBrian C. Lane2022-03-251-7/+2
| | | | It is safe to free even if they are NULL.
* gpt: Include xalloc-oversized.hBrian C. Lane2022-03-231-0/+1
|
* maint: Add ./lib/malloc and libparted-fs-resize.pc to .gitignoreBrian C. Lane2022-03-231-0/+2
|
* maint: Update copyright statements to 2022Brian C. Lane2022-03-23236-236/+236
| | | | By running make update-copyright
* maint: Bump library REVISION number for releaseBrian C. Lane2022-03-232-2/+2
|
* maint: Update to latest gnulib and bootstrap scriptBrian C. Lane2022-03-232-115/+144
|
* doc: Add bios_grub to parted manpageBrian C. Lane2021-12-011-1/+1
|
* docs: Update documentation to be consistentBrian C. Lane2021-10-063-56/+149
| | | | | | | | | This fixes some missing commands in the parted.texi file used to generate the web manual and info document. It also removes documentation for the never-implemented 'print NUMBER' command which only returns 1. The parted manpage has been updated to document the available print options, disk_set, and disk_toggle commands.
* gpt: Revert to filesystem GUID when setting flag to offBrian C. Lane2021-09-301-1/+1
|
* tests: Add a test to make sure GPT GUIDs default to filesystemBrian C. Lane2021-09-302-0/+108
| | | | | | | When no flag is set on a GPT partition the GUID should fall back to the filesystem type for fat32, swap, and hfs+ and if no filesystem is found it should default to linux filesystem data type, showing no filesystem and no flags.
* doc: Document gpt linux-home flagBrian C. Lane2021-09-302-1/+6
|
* gpt: Add linux-home flagArvin Schnell2021-09-303-2/+10
| | | | | | | This sets the partition GUID to the linux home type: 933AC7E1-2EB4-4F13-B844-0E14E2AEF915 Signed-off-by: Brian C. Lane <bcl@redhat.com>
* gpt: Map PED_PARTITON_ flags to GUID valuesArvin Schnell2021-09-291-423/+54
| | | | | | | Drop the 14 flags from _GPTPartitionData that correspond to a partition type/uuid. Use the type/uuid directly instead. Signed-off-by: Brian C. Lane <bcl@redhat.com>
* keep GUID specific attributesArvin Schnell2021-09-234-22/+129
| | | | | | Keep GUID specific attributes when writing GPT. Signed-off-by: Brian C. Lane <bcl@redhat.com>
* hurd: Implement partition table rereadingColin Watson2021-09-221-6/+78
| | | | | | | | We have to tell both the device for the drive itself, it case it implements the partitioned devices, and tell the partition devices to go away, in case they are implemented on their own by using parted. Signed-off-by: Brian C. Lane <bcl@redhat.com>
* hurd: Support rumpdisk-based device namesSamuel Thibault2021-09-221-0/+9
| | | | Signed-off-by: Brian C. Lane <bcl@redhat.com>
* hurd: Fix partition pathsColin Watson2021-09-221-1/+1
| | | | | | | We have always had an 's' to separate drive number from partition number. Signed-off-by: Brian C. Lane <bcl@redhat.com>
* parted: Add --json cmdline switch to output JSONArvin Schnell2021-08-259-12/+624
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This outputs the disk's details as a JSON object. eg. a disk image with a single partition from 1M to 100M: { "disk": { "path": "/root/disk1.img", "size": "2097152s", "model": "", "transport": "file", "logical-sector-size": 512, "physical-sector-size": 512, "label": "gpt", "max-partitions": 128, "partitions": [ { "number": 0, "start": "34s", "end": "2047s", "size": "2014s", "type": "free" },{ "number": 1, "start": "2048s", "end": "200703s", "size": "198656s", "type": "primary", "name": "root" },{ "number": 0, "start": "200704s", "end": "2097118s", "size": "1896415s", "type": "free" } ] } } Signed-off-by: Brian C. Lane <bcl@redhat.com>
* parted: Allow empty string for partition nameArvin Schnell2021-08-253-2/+49
| | | | | | | | | | | This makes it possible to pass an empty string in script mode e.g. to set no partition name (on GPT): parted -s ./disk.img mklabel gpt mkpart '""' ext2 1 100M Includes a new test for this feature. Signed-off-by: Brian C. Lane <bcl@redhat.com>
* libparted: Check devpath before passing to strlenBrian C. Lane2021-08-251-0/+3
|
* libparted: Tell libdevmapper to retry remove when BUSYBrian C. Lane2021-08-101-0/+1
| | | | | | | | | | | This sets the libdevmapper retry remove flag, which will retry a remove command if it is BUSY. parted already has it's own BUSY retry code, but when run with device-mapper an error can be printed by libdevmapper which can be confusing to the user. Resolves: rhbz#1980697
* parted: Escape colons and backslashes in machine outputBrian C. Lane2021-08-101-4/+38
| | | | | | | The device path, device model, and partition name could all contain colons or backslashes. This escapes all of these with a backslash. Thanks to Arvin Schnell for the patch.
* tests: check for vfat kernel support and toolsRoss Burton2021-08-102-0/+5
| | | | | | | | | t1100-busy-label.sh and t1101-busy-partition.sh create and mount VFAT partitions, so check for both the tools and the kernel support. Fixes bug#49594. Signed-off-by: Brian C. Lane <bcl@redhat.com>
* tests: add a helper to check the kernel knows about a file systemRoss Burton2021-08-101-0/+10
| | | | | | | | | | | | | | | Some tests need both the file system tools (eg mkfs.vfat) and kernel support (eg vfat kernel module) to pass. There are already helpers such as require_fat_ which check for mkfs.vfat, but if the kernel doesn't support the filesystem then mounting the disk image will fail. Add require_filesystem_, which checks for either the filesystem name in /proc/filesystems (so it's built-in, or already loaded) or if the name is a valid module (so can be loaded on demand). Signed-off-by: Brian C. Lane <bcl@redhat.com>
* tests: add aarch64 and mips64 as a valid 64-bit machinesRoss Burton2021-08-101-1/+1
| | | | | | | | require_64_bit_ in t-lib-helpers.sh has a hard-coded list of uname machines that are 64-bit, so add aarch64 and mips64 to cover the major architectures. Signed-off-by: Brian C. Lane <bcl@redhat.com>
* libparted: Add swap flag to msdos disklabelBrian C. Lane2021-08-102-4/+24
| | | | | | | | | Previously you had to set the filesystem type to one of the linux-swap options at creation time. With this change you can now toggle the partition swap type using the 'swap' partition flag in the same way that you can on gpt disklabels. Thanks to Arvin Schnell for this patch.
* Move Exception Option values into enumBrian C. Lane2021-08-101-11/+16
| | | | | | | | | | | | | | | | | | Adding enums together doesn't create a new enum value, so when compiling with warnings you will get warnings like: warning: case value ‘96’ not in enumerated type for PED_EXCEPTION_IGNORE_CANCEL This moved the defines into the enum as new values so that they are recognized as valid members of the enum with the values staying the same. NOTE: PED_EXCEPTION_OPTION_LAST *MUST* be the last of the individual options, not the combined options. Thanks to D. Hugh Redelmeier for this patch.
* tests/t3000: Use mkfs.hfsplus and fsck.hfsplus for resize testsBrian C. Lane2021-07-291-4/+4
|
* tests/t3000: Check for hfs and vfat support separatelyBrian C. Lane2021-07-151-3/+13
| | | | | | | Previously the whole test would be skipped if either mkfs.hfs or mkfs.vfat were not installed, leading to missing test coverage. This change checks for them individually so that the test will run with either or both of them installed
* tests/t6006: Change dev_size_mb to 10Brian C. Lane2021-07-141-6/+6
| | | | | This is backed by memory, so using more than is needed limits the size of the system it can run on.
* tests/t3200: Change dev_size_mb to 10Brian C. Lane2021-07-141-2/+2
| | | | | This is backed by memory, so using more than is needed limits the size of the system it can run on.
* tests/t3000: Change dev_size_mb to 267Brian C. Lane2021-07-141-2/+2
| | | | | | | | FAT32 needs a minimum partition size of 256MB so this is as small as we can make it. This is backed by memory, so using more than is needed limits the size of the system it can run on.
* tests/t1701: Change dev_size_mb to 10Brian C. Lane2021-07-121-2/+2
| | | | | This is backed by memory, so using more than is needed limits the size of the system it can run on.
* tests/t1102: Change dev_size_mb to 10Brian C. Lane2021-07-121-3/+3
| | | | | This is backed by memory, so using more than is needed limits the size of the system it can run on.
* tests/t1101: Change dev_size_mb to 10Brian C. Lane2021-07-121-3/+3
| | | | | This is backed by memory, so using more than is needed limits the size of the system it can run on.
* tests/t1100: Change dev_size_mb to 10Brian C. Lane2021-07-121-3/+3
| | | | | This is backed by memory, so using more than is needed limits the size of the system it can run on.
* tests: t9050 Use /dev/zero for temporary file and mkswapBrian C. Lane2021-06-141-4/+10
| | | | | and clean up the usage a little bit by giving it a proper name and removing the file when finished.
* tests: t0400 - Work around a mkswap bug by using /dev/zeroBrian C. Lane2021-06-141-1/+6
| | | | | | mkswap gets stuck, in some situations, when operating on a file full of holes (see https://bugzilla.redhat.com/show_bug.cgi?id=1971877) so work around that by using /dev/zero instead of /dev/null
* libparted: Fix potential memory leak in gpt_writeBrian C. Lane2021-06-111-4/+8
| | | | | _generate_header() can return with 1 after allocating gpt so it needs to be freed in the error path.
* libparted: Fix warning about buffer size in Atari labelBrian C. Lane2021-06-111-6/+11
| | | | | | When the Atari table is empty it copies 'PARTEDATARI' into the id, and the start and size bytes. This can be confusion, so turn it into a union of the string and the non-empty values.
* parted: Fix memory leaks in do_resizepartBrian C. Lane2021-06-111-2/+4
|
* parted: Free tmp usage inside do_printBrian C. Lane2021-06-111-0/+1
| | | | str_list_create calls gettext_to_wchar which makes a copy of it.
* parted: Fix end_input leak in do_mkpartBrian C. Lane2021-06-111-2/+3
|
* fs: Fix copy-paste error in HFS journal codeBrian C. Lane2021-06-111-3/+5
|
* libparted: Fix potential memory leak in sdmmc_get_product_infoBrian C. Lane2021-06-111-1/+7
|
* libparted: Fix fd check in _flush_cacheBrian C. Lane2021-06-111-1/+1
| | | | In theory open() could return 0 so the correct error value is -1.
* t0501-duplicate.sh: Add some more disk label types to the duplicate testBrian C. Lane2021-02-091-2/+7
| | | | | | | | | Add sun, atari, mac, and pc98 to the disklabels that we test ped_disk_duplicate on. aix isn't included because it doesn't support adding partitions. dvh doesn't support boot partition loop cannot be partitioned
* tests: Increase disk size for duplicate testBrian C. Lane2021-02-091-3/+3
| | | | | | Increase it from 8MiB to 32MiB and start the first partition at 2048 sector boundary instead of 32 so that no matter the sector size it will be aligned.