]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libfdisk: constify builtin fdisk_parttype
authorThomas Weißschuh <thomas@t-8ch.de>
Thu, 11 Jan 2024 07:12:45 +0000 (08:12 +0100)
committerThomas Weißschuh <thomas@t-8ch.de>
Thu, 11 Jan 2024 07:16:36 +0000 (08:16 +0100)
commit3ca03d59f2e70d7f2bb33e23e34693f61423cfa5
treed7922d6507574c97f79d05428f83c75600e0ab50
parent6f3f22438234b626c388f336d637905aaf12dbd2
libfdisk: constify builtin fdisk_parttype

The builtin struct fdisk_parttypes are not supposed to be modified.
This is enforced in the mutation functions.

While the API could be cleaned up to distinguish between const and
non-const versions of fdisk_parttype this could break user code.

Instead preserve the API and add some internal casts.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
libfdisk/src/bsd.c
libfdisk/src/dos.c
libfdisk/src/fdiskP.h
libfdisk/src/gpt.c
libfdisk/src/parttype.c
libfdisk/src/sgi.c
libfdisk/src/sun.c