| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
| |
It is safe to free even if they are NULL.
|
| |
|
| |
|
|
|
|
| |
By running make update-copyright
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
This sets the partition GUID to the linux home type:
933AC7E1-2EB4-4F13-B844-0E14E2AEF915
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
|
|
|
| |
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 attributes when writing GPT.
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
|
|
|
| |
We have always had an 's' to separate drive number from partition
number.
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
This is backed by memory, so using more than is needed limits the size
of the system it can run on.
|
|
|
|
|
| |
This is backed by memory, so using more than is needed limits the size
of the system it can run on.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This is backed by memory, so using more than is needed limits the size
of the system it can run on.
|
|
|
|
|
| |
This is backed by memory, so using more than is needed limits the size
of the system it can run on.
|
|
|
|
|
| |
This is backed by memory, so using more than is needed limits the size
of the system it can run on.
|
|
|
|
|
| |
This is backed by memory, so using more than is needed limits the size
of the system it can run on.
|
|
|
|
|
| |
and clean up the usage a little bit by giving it a proper name and
removing the file when finished.
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
_generate_header() can return with 1 after allocating gpt so it needs to
be freed in the error path.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
str_list_create calls gettext_to_wchar which makes a copy of it.
|
| |
|
| |
|
| |
|
|
|
|
| |
In theory open() could return 0 so the correct error value is -1.
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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.
|