| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
* NEWS: Record release date.
|
| |
|
| |
|
|
|
|
| |
By running make update-copyright
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a bug when using KiB to specify the ending location of a
partition. It was not subtracting 1s like it does with the other units
because it was looking for a 'k' not a 'K'.
This also fixes a quirk of the suffix checking code, it would check for
matching case, but converting to the actual IEC value was case
insensitive. This now uses common functions for the matching so that
case doesn't matter.
It also adds tests to check for the fix.
The only change in behavior is that using KiB to specify the ending
location of a partition will now correctly create the end 1s lower than
the specified location like it does for MiB, GiB, etc.
|
|
|
|
|
|
|
|
|
|
| |
The assert message includes sector values, which are long long int, so
use the proper formatting of %lld.
The snprintf warning complained about trying to write 258 bytes so I
bumped the buffer size up to 259. The return value is already being
checked for truncation so this is just to keep the compiler happy
without having to suppress the warning.
|
|
|
|
|
|
|
|
| |
Also removes a cast from const char* to char* when passing to readline
that doesn't appear to be necessary any longer.
Added asserts to make sure prompt isn't NULL after strdup and realloc
calls.
|
|
|
|
|
|
| |
It could return a NULL if the realloc fails. This handles the failure in
the same way as other failures in wchar_to_str, it exits immediately
with an error message.
|
| |
|
|
|
|
| |
If the filesystem type name isn't known it can return a NULL.
|
|
|
|
|
|
| |
The fail and fail_if functions from libcheck are deprecated, replace
them with ck_abort_msg and ck_assert_msg. Note that the logic of assert
is the opposite of fail_if.
|
|
|
|
|
|
|
|
|
| |
There was a 1-off error in _partition_get_overlap_constraint that
prevented partitions from being created in 1s free space. You could
create 1s partitions as long they were done in order, but not after
leaving 'holes'.
This fixes this and adds tests for it on msdos and gpt disklabels.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add user requested support for GPT partition type attribute bit 63 [1]
so the no-auto flag in the systemd originated Discoverable Partitions
Specification [2] can be manipulated. The UEFI specification [3] says
partition attribute bits 48 to 63 are partition type specific, however
the DPS [2] and Microsoft [4] use the bit 63 to mean no automounting /
assign no drive letter and apply it to multiple partition types so don't
restrict its application.
[1] Request for GPT partition attribute bit 63 "no automount" editing
support
https://gitlab.gnome.org/GNOME/gparted/-/issues/214
[2] The Discoverable Partitions Specification (DPS),
Partition Attribute Flags
https://uapi-group.org/specifications/specs/discoverable_partitions_specification/
[3] UEFI Specification, version 2.8,
Table 24. Defined GPT Partition Entry - Attributes
https://uefi.org/sites/default/files/resources/UEFI_Spec_2_8_final.pdf
[4] CREATE_PARTITION_PARAMETERS structure (vds.h)
https://learn.microsoft.com/en-gb/windows/win32/api/vds/ns-vds-create_partition_parameters
Signed-off-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This adds 2 new disk type features, one for the whole disk UUID and
another for the per-partition UUID. It adds ped_disk_get_uuid and
ped_partition_get_uuid functions to retrieve them.
It adds them to the JSON output on GPT disklabeled disks as "uuid" in
the disk and partitions sections of the JSON output.
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
|
| |
Test the libparted API to make sure the flag is not cleared by calling
ped_partition_set_system.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This restores the previous behavior by testing the partition type
against the list of known types and skipping the filesystem type reset.
Now the sequence of:
ped_partition_new(...)
ped_partition_set_flag(part, PED_PARTITION_BLS_BOOT, 1);
ped_partition_set_system(part, ped_file_system_type_get("ext4"));
Will keep the type set to PED_PARTITION_BLS_BOOT, which is how it used
to behave.
|
|
|
|
|
| |
Test the libparted API to make sure the flag is not cleared by calling
ped_partition_set_system.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This restores the previous behavior by testing the GUID against the list
of known types and skipping the filesystem GUID reset. Now the sequence
of:
ped_partition_new(...)
ped_partition_set_flag(part, PED_PARTITION_BIOS_GRUB, 1);
ped_partition_set_system(part, ped_file_system_type_get("ext4"));
Will keep the GUID set to PED_PARTITION_BIOS_GRUB, which is how it used
to behave.
|
|
|
|
|
|
|
|
|
|
| |
The preprocessor doesn't evaluate the enum, so it ends up being 0, which
causes problems for library users like pyparted which try to use the _LAST
value to conditionally include support for newer flags.
Instead just define the int that is the first and last entry in each enum.
Thanks to adamw and dcantrell for help arriving at a solution.
|
|
|
|
|
|
|
|
|
| |
_PedDiskOps::get_max_primary_partition_count is always available, the
macro PT_op_function_initializers ensures it. So use
ped_disk_get_max_primary_partition_count instead of
_PedDiskOps::get_max_primary_partition_count directly.
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
|
|
|
|
| |
Fix a copy/paste error. In practice this didn't cause any problems
because the *_set_type_id and *_get_type_id are either both NULL or both
set to the function.
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
| |
|
|
|
|
|
|
| |
Without this the print command keeps showing the type selected with
mkpart, which doesn't match the id/uuid set by the user. So rescan the
partition for a filesystem.
|
|
|
|
|
|
|
|
| |
Support the swap flag and fix reading flags from disk. Also
cleanup code by dropping the 2 flags "raid" and "lvm" from
DasdPartitionData and instead use "system" directly.
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Include the partition type-id and type-uuid in the JSON
output. Also add the the command 'type' to set them. Remove
redundant flags from DosPartitionData and use only the system
variable.
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
|
|
| |
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
|
|
|
|
| |
* NEWS: Record release date.
|
| |
|
| |
|
|
|
|
|
|
| |
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
|
|
|
|
| |
* NEWS: Record release date.
|
| |
|
|
|
|
|
|
| |
This complements commit b20227adf5 from five months ago.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
|
|
|
|
|
|
| |
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
|
|
|
|
| |
* NEWS: Record release date.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This is to quiet automake warnings about Makefile.am files using GNU
make extensions like pattern rules.
|
| |
|
| |
|
| |
|
|
|
|
| |
It is safe to free even if they are NULL.
|
| |
|
| |
|
|
|
|
| |
By running make update-copyright
|