| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As GCC 8 suggests, add 'pure' attribute to 17 functions. After adding
pure attributes, GCC suggested three more functions to add pure
attributes. Add pure attribute to those functions also. In total, add
pure attributes to 20 functions.
I read code of the functions and confirmed the 20 functions are pure:
they have no effect except the return value, and their return value
depend only on the parameters and/or global variables.
Signed-off-by: Shin'ichiro Kawasaki <kawasaki@juno.dti.ne.jp>
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
libparted/fs/r/hfs/hfs.c has a '#if 0' block. The block refers two
functions hfsplus_clobber() and hfs_clobber(). It have GCC report a
warning below.
CC r/hfs/hfs.lo
r/hfs/hfs.c:343:1: warning: 'hfsplus_clobber' defined but not used [-Wunused-function]
343 | hfsplus_clobber (PedGeometry* geom)
| ^~~~~~~~~~~~~~~
To avoid the warning, add two more '#if 0' to disable the two functions.
Signed-off-by: Shin'ichiro Kawasaki <kawasaki@juno.dti.ne.jp>
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Two case statements have intentional fall-throughs but do not have
comments to note it. GCC detects and warns those case statements. To
avoid the warning, add fall-through comments.
Signed-off-by: Shin'ichiro Kawasaki <kawasaki@juno.dti.ne.jp>
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GCC 8 reports two warnings as follows.
r/fat/bootsector.c: In function 'fat_boot_sector_set_boot_code':
r/fat/bootsector.c:274:15: warning: unused variable 'fs_info' [-Wunused-variable]
FatSpecific* fs_info = FAT_SPECIFIC (fs);
^~~~~~~
In function 'memcpy',
inlined from 'fat_boot_sector_set_boot_code' at r/fat/bootsector.c:283:2:
/usr/include/bits/string_fortified.h:34:10: warning: '__builtin_memcpy' forming offset [126, 128] is out of the bounds [0, 125] [-Warray-bounds]
return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To avoid the warnings, remove the unused variable. Use strcpy in place of
memcpy checking copy length.
Signed-off-by: Shin'ichiro Kawasaki <kawasaki@juno.dti.ne.jp>
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GCC warns that a variable 'prealloc' defined for _generic_affs_probe() in
fs/amiga/affs.c is set but its value is never used.
CC amiga/affs.lo
amiga/affs.c: In function '_generic_affs_probe':
amiga/affs.c:54:35: warning: variable 'prealloc' set but not used [-Wunused-but-set-variable]
54 | int blocksize = 1, reserved = 2, prealloc = 0;
| ^~~~~~~~
Remove the variable for simplicity and to avoid the warning.
Signed-off-by: Shin'ichiro Kawasaki <kawasaki@juno.dti.ne.jp>
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|
|
|
|
|
|
|
| |
Given that there's no code which would use it there's no reason to link
to libsepol or libselinux even when they are available.
Signed-off-by: Brian C. Lane <bcl@redhat.com>
|