summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* tests: Fix t9041-undetected-in-use-16th-partitionCristian Klein2021-01-281-1/+1
| | | | | | | | | | | Sometimes fails with: ``` + mkfs.ext3 /dev/sda15 mke2fs 1.45.5 (07-Jan-2020) /dev/sda15: Not enough space to build proposed filesystem while setting up superblock ``` Signed-off-by: Brian C. Lane <bcl@redhat.com>
* tests: Fix test t1700-probe-fsCristian Klein2021-01-281-1/+1
| | | | | | | | | | | | | mkfs.ext3 (see version below) was complaining that the filesystem is too small for a journal, which made the test fail. ``` $ mkfs.ext3 -V mke2fs 1.45.5 (07-Jan-2020) Using EXT2FS Library version 1.45.5 ``` Signed-off-by: Brian C. Lane <bcl@redhat.com>
* tests: Add tests for --fixCristian Klein2021-01-282-1/+102
| | | | Signed-off-by: Brian C. Lane <bcl@redhat.com>
* doc: Document --fix flagCristian Klein2021-01-282-0/+9
| | | | | | Also fix copyright year, to please `make syntax-check`. Signed-off-by: Brian C. Lane <bcl@redhat.com>
* parted: add --fix to "fix" in script modeCristian Klein2021-01-283-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use-case: VMs are booted from images that are smaller than their virtual disk. This means that -- almost by definition -- the secondary GPT header will be "misplaced", i.e., not at the end of the virtual disk. Without this patch, parted cannot be used for custom/exotic partitioning when the VM boots (e.g., in cloud-init's `bootcmd`). Specifically, it will fail as follows: ``` $ sudo parted --script /dev/vda "mkpart 2 10GB -1" Warning: Not all of the space available to /dev/vda appears to be used, you can fix the GPT to use all of the space (an extra 500 blocks) or continue with the current setting? Error: Unable to satisfy all constraints on the partition. ``` This happens because, in script mode, exceptions are usually not resolved. This patch adds `--fix`. This allows exceptions to be automatically resolved with Fix. As a result, the following command will work: ``` $ sudo parted --fix --script /dev/vda "mkpart 2 10GB -1" ``` Signed-off-by: Brian C. Lane <bcl@redhat.com>
* libparted: Add includes for gnulib redefining freeBrian C. Lane2021-01-281-0/+6
| | | | | | | | gnulib redefines free using #define, causing problems with the pt-common.h file. Work around that by including standard header files as suggested by gnulib maintainer: https://lists.gnu.org/archive/html/bug-gnulib/2021-01/msg00315.html
* maint: Update bootstrap script from latest gnulibBrian C. Lane2021-01-271-5/+8
|
* maint: Update to latest gnulibBrian C. Lane2021-01-271-0/+0
|
* maint: post-release administriviaBrian C. Lane2021-01-273-2/+5
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.4v3.4Brian C. Lane2021-01-271-1/+1
| | | | * NEWS: Record release date.
* NEWS: Mention the non-public gnulib commitBrian C. Lane2021-01-271-0/+3
|
* cfg.mk: disable submodule checks to work around broken upstream gnulibBrian C. Lane2021-01-261-0/+4
|
* Include local gnulib change to version-etc.c dateBrian C. Lane2021-01-261-0/+0
|
* maint: Update copyright statements to 2021Brian C. Lane2021-01-18235-235/+235
| | | | By running make update-copyright
* README-release: Add information for updating the Translation ProjectBrian C. Lane2021-01-181-0/+8
|
* maint: post-release administriviaBrian C. Lane2020-12-143-2/+5
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.3.52v3.3.52Brian C. Lane2020-12-141-1/+1
| | | | * NEWS: Record release date.
* libparted/fs: Add ./lib to include search pathBrian C. Lane2020-12-111-1/+1
|
* libparted: Check for NULL flag_name in ped_partition_flag_get_by_nameBrian C. Lane2020-12-111-2/+2
| | | | strcasecmp parameters cannot be NULL according to gcc -Wanalyzer-null-argument
* po/POTFILES.in: Remove xstrtol-error.cBrian C. Lane2020-12-111-1/+0
| | | | | Appears to no longer be needed, results in an error when running make check syntax-check.
* maint: Update copyright statements to 2020Brian C. Lane2020-12-11231-294/+337
| | | | By running make update-copyright
* configure.ac (AC_PREREQ): Require 2.64Brian C. Lane2020-12-111-1/+1
|
* maint: Bump library REVISION number for releaseBrian C. Lane2020-12-112-2/+2
|
* maint: Update bootstrap script from latest gnulibBrian C. Lane2020-12-111-6/+20
|
* maint: Update to latest gnulibBrian C. Lane2020-12-111-0/+0
|
* labels/bsd.c: Drop alpha_bootblock_checksum from bsd_probeBrian C. Lane2020-12-041-2/+0
| | | | | | | | | | | | | 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>
* libparted/fs: Fix GCC warnings suggesting pure for PED_ASSERT functionsBrian C. Lane2020-11-203-9/+9
| | | | | | | 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.
* libparted: Remove disabled codeBrian C. Lane2020-11-203-59/+0
|
* fs/r/hfs: Remove disabled codeBrian C. Lane2020-11-201-194/+0
|
* fs/r/fat: Remove disabled codeBrian C. Lane2020-11-203-275/+0
|
* hfs/reloc_plus: Fix gcc 10 warnings about cast alignmentBrian C. Lane2020-11-201-14/+19
|
* hfs/reloc: Fix gcc 10 warnings about cast alignmentBrian C. Lane2020-11-201-15/+20
|
* ui: Fix gcc 10 warning about snprintf truncating an intBrian C. Lane2020-11-201-2/+2
| | | | Double the storage to 20 bytes.
* ui: Fix command_line_get_disk_flagBrian C. Lane2020-11-201-1/+1
| | | | | It was using PedPartitionFlag instead of PedDiskFlag when walking the available flags.
* ped_assert: Fix incorrect exception optionBrian C. Lane2020-11-201-1/+1
| | | | | PED_EXCEPTION_FATAL is a type, not an option. A PED_EXCEPTION_BUG should always select CANCEL.
* ufs: Fix gcc 10 warnings about cast alignmentBrian C. Lane2020-11-201-4/+4
|
* ntfs: Fix gcc 10 warnings about cast alignmentBrian C. Lane2020-11-201-5/+6
|
* nilfs2: Fix gcc 10 warnings about cast alignmentBrian C. Lane2020-11-201-6/+5
|
* ext2: Fix gcc 10 warnings about cast alignmentBrian C. Lane2020-11-202-4/+5
|
* hfs/hfs: Fix gcc 10 warnings about cast alignmentBrian C. Lane2020-11-201-5/+4
|
* hfs/advfs_plus: Fix gcc 10 warnings about cast alignmentBrian C. Lane2020-11-201-10/+12
|
* hfs/advfs: Fix gcc 10 warnings about cast alignmentBrian C. Lane2020-11-201-11/+14
|
* hfs: Fix gcc 10 bounds check warningBrian C. Lane2020-11-202-2/+2
| | | | | binfo is actually a list of structs that cannot be known until runtime, so use a variable length array.
* tests: Fix unsigned warning in duplicate.cBrian C. Lane2020-11-201-1/+1
|
* linux: Fix gcc complains about signed sccanf variablesBrian C. Lane2020-11-201-4/+4
|
* dos: Fix gcc complaints when using boot_code pointerBrian C. Lane2020-11-201-1/+1
|
* bsd: Fix gcc complaints when using boot_code pointerBrian C. Lane2020-11-201-8/+5
|
* libparted: Fix warnings from GCC 8 -Wsuggest-attribute=constShin'ichiro Kawasaki2020-11-202-8/+8
| | | | | | | | | | | | | 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>
* libparted: Fix warnings from GCC 8 -Wsuggest-attribute=pureShin'ichiro Kawasaki2020-11-209-20/+20
| | | | | | | | | | | | | | 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: Avoid a GCC warning for unused functionsShin'ichiro Kawasaki2020-11-051-0/+4
| | | | | | | | | | | | | | | | 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>