| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
It is safe to free even if they are NULL.
|
| |
|
|
|
|
| |
By running make update-copyright
|
| |
|
| |
|
|
|
|
|
|
|
| |
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 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
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
_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.
|
| |
|
| |
|
|
|
|
| |
In theory open() could return 0 so the correct error value is -1.
|
|
|
|
| |
By running make update-copyright
|
| |
|
|
|
|
| |
strcasecmp parameters cannot be NULL according to gcc -Wanalyzer-null-argument
|
|
|
|
| |
By running make update-copyright
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thanks to Alpine Linux for catching this. In commit
a5f69f396713ab8ac1e57458cbb9af552d2c1659 I change label to actually
point to the label and failed to pass the new s0 to
alpha_bootblock_checksum() instead of label. So it was writing the
so-called checksum off the end of the 512b sector buffer.
bug: https://gitlab.alpinelinux.org/alpine/aports/-/issues/12161
upstream report: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45026
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
|
|
|
| |
There was some question about whether or not pure should be used for
functions with PED_ASSERT (or exit) in them. It should be fine, since
the values checked by the ASSERT are passed to the function directly.
Behavior should be exactly the same for the same inputs.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
PED_EXCEPTION_FATAL is a type, not an option. A PED_EXCEPTION_BUG should
always select CANCEL.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
binfo is actually a list of structs that cannot be known until runtime,
so use a variable length array.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As GCC 8 suggests, add 'const' attribute to six functions. After adding
const attributes, GCC suggested two more functions to add const
attributes. Add const attributes to those functions also. In total, add
const attributes to 8 functions.
I read code of the functions and confirmed they are const: they examine
only their arguments and have no effect other than return value.
Signed-off-by: Shin'ichiro Kawasaki <kawasaki@juno.dti.ne.jp>
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|