commit: ea88d8b06ba2ae5df56e34badc103f0c5e274826
parent d1c3f5f5cc94c6f1d2926e9f6a3742a534f280db
Author: Michael Forney <mforney@mforney.org>
Date: Tue, 21 Jan 2020 15:40:06 -0800
util-linux: Update to 2.35
Diffstat:
16 files changed, 244 insertions(+), 262 deletions(-)
diff --git a/pkg/util-linux/config.h b/pkg/util-linux/config.h
@@ -15,6 +15,7 @@
#define HAVE_CLEARENV 1
#define HAVE_CLOCK_GETTIME 1
#define HAVE_CPU_SET_T 1
+/* #undef HAVE_CRYPTSETUP */
#define HAVE_CRYPT_H 1
/* #undef HAVE_DCGETTEXT */
#define HAVE_DECL_CPU_ALLOC 1
@@ -34,6 +35,7 @@
#define HAVE_EXPLICIT_BZERO 1
/* #undef HAVE_FALLOCATE */
#define HAVE_FCNTL_H 1
+#define HAVE_FMEMOPEN 1
#define HAVE_FPURGE 1
#define HAVE_FSEEKO 1
#define HAVE_FSTATAT 1
@@ -83,6 +85,7 @@
#define HAVE_LINUX_BLKPG_H 1
#define HAVE_LINUX_BLKZONED_H 1
#define HAVE_LINUX_BTRFS_H 1
+#define HAVE_LINUX_CAPABILITY_H 1
#define HAVE_LINUX_CDROM_H 1
/* #undef HAVE_LINUX_COMPILER_H */
#define HAVE_LINUX_FALLOC_H 1
@@ -121,11 +124,14 @@
#define HAVE_PATHS_H 1
/* #undef HAVE_PCRE */
#define HAVE_PERSONALITY 1
+/* #undef HAVE_PIDFD_OPEN */
+/* #undef HAVE_PIDFD_SEND_SIGNAL */
#define HAVE_POSIX_FADVISE 1
/* #undef HAVE_POSIX_FALLOCATE */
#define HAVE_PRCTL 1
/* #undef HAVE_PRLIMIT */
#define HAVE_PROGRAM_INVOCATION_SHORT_NAME 1
+#define HAVE_PTY 1
#define HAVE_PTY_H 1
/* #undef HAVE_QSORT_R */
#define HAVE_REBOOT 1
@@ -137,7 +143,7 @@
#define HAVE_SCANF_MS_MODIFIER 1
/* #undef HAVE_SCHED_SETATTR */
#define HAVE_SCHED_SETSCHEDULER 1
-/* #undef HAVE_SECURE_GETENV */
+#define HAVE_SECURE_GETENV 1
/* #undef HAVE_SECURITY_GET_INITIAL_CONTEXT */
/* #undef HAVE_SECURITY_OPENPAM_H */
/* #undef HAVE_SECURITY_PAM_APPL_H */
@@ -225,11 +231,11 @@
#define HAVE___FPURGE 1
#define HAVE___PROGNAME 1
/* #undef HAVE___SECURE_GETENV */
-#define LIBBLKID_DATE "14-Jun-2019"
-#define LIBBLKID_VERSION "2.34.0"
-#define LIBFDISK_VERSION "2.34.0"
-#define LIBMOUNT_VERSION "2.34.0"
-#define LIBSMARTCOLS_VERSION "2.34.0"
+#define LIBBLKID_DATE "21-Jan-2020"
+#define LIBBLKID_VERSION "2.35.0"
+#define LIBFDISK_VERSION "2.35.0"
+#define LIBMOUNT_VERSION "2.35.0"
+#define LIBSMARTCOLS_VERSION "2.35.0"
/* #undef LOGIN_CHOWN_VCS */
/* #undef LOGIN_STAT_MAIL */
#define LT_OBJDIR ".libs/"
@@ -239,15 +245,17 @@
#define PACKAGE "util-linux"
#define PACKAGE_BUGREPORT "kzak@redhat.com"
#define PACKAGE_NAME "util-linux"
-#define PACKAGE_STRING "util-linux 2.34"
+#define PACKAGE_STRING "util-linux 2.35"
#define PACKAGE_TARNAME "util-linux"
#define PACKAGE_URL "http://www.kernel.org/pub/linux/utils/util-linux/"
-#define PACKAGE_VERSION "2.34"
+#define PACKAGE_VERSION "2.35"
#define PG_BELL 1
#define STDC_HEADERS 1
/* #undef SYS_fallocate */
/* #undef SYS_ioprio_get */
/* #undef SYS_ioprio_set */
+/* #undef SYS_pidfd_open */
+/* #undef SYS_pidfd_send_signal */
/* #undef SYS_pivot_root */
/* #undef SYS_prlimit64 */
/* #undef SYS_sched_getaffinity */
@@ -258,6 +266,7 @@
/* #undef SYS_unshare */
/* #undef TM_IN_SYS_TIME */
#define USE_COLORS_BY_DEFAULT 1
+/* #undef USE_HWCLOCK_CMOS */
/* #undef USE_LIBMOUNT_SUPPORT_MTAB */
#define USE_LIBMOUNT_SUPPORT_NAMESPACES 1
#define USE_PLYMOUTH_SUPPORT 1
@@ -279,7 +288,7 @@
#endif
#define USE_TTY_GROUP 1
/* #undef USE_USRDIR_PATHS_ONLY */
-#define VERSION "2.34"
+#define VERSION "2.35"
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
diff --git a/pkg/util-linux/gen.lua b/pkg/util-linux/gen.lua
@@ -1,4 +1,4 @@
-set('version', '2.34.0')
+set('version', '2.35.0')
cflags{
'-include $dir/config.h',
'-I $outdir',
@@ -56,6 +56,7 @@ lib('libcommon.a', [[
sha1.c
signames.c
+ caputils.c
linux_version.c
loopdev.c
diff --git a/pkg/util-linux/patch/0001-Don-t-omit-second-operand-to-operator.patch b/pkg/util-linux/patch/0001-Don-t-omit-second-operand-to-operator.patch
@@ -1,4 +1,4 @@
-From c8ea4def89774dbc0e0d4957108c7d6d18a00320 Mon Sep 17 00:00:00 2001
+From ee722c6acbea8bd467ce7a8100d185d72e6573b4 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Tue, 18 Jun 2019 01:38:53 -0700
Subject: [PATCH] Don't omit second operand to `?` operator
@@ -13,7 +13,7 @@ Subject: [PATCH] Don't omit second operand to `?` operator
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/libfdisk/src/bsd.c b/libfdisk/src/bsd.c
-index 4e05bb328..817f50c87 100644
+index a7e2791a7..c31a29156 100644
--- a/libfdisk/src/bsd.c
+++ b/libfdisk/src/bsd.c
@@ -116,7 +116,7 @@ static struct fdisk_parttype *bsd_partition_parttype(
@@ -26,7 +26,7 @@ index 4e05bb328..817f50c87 100644
diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c
-index 6dc276e8a..2543edc04 100644
+index 53713ec5f..4a2cd946b 100644
--- a/libfdisk/src/dos.c
+++ b/libfdisk/src/dos.c
@@ -136,7 +136,7 @@ static struct fdisk_parttype *dos_partition_parttype(
@@ -39,10 +39,10 @@ index 6dc276e8a..2543edc04 100644
/*
diff --git a/libfdisk/src/gpt.c b/libfdisk/src/gpt.c
-index 1658782a8..64a9cd7b3 100644
+index f50bb4441..a2a346faa 100644
--- a/libfdisk/src/gpt.c
+++ b/libfdisk/src/gpt.c
-@@ -384,7 +384,7 @@ static struct fdisk_parttype *gpt_partition_parttype(
+@@ -248,7 +248,7 @@ static struct fdisk_parttype *gpt_partition_parttype(
guid_to_string(&guid, str);
t = fdisk_label_get_parttype_from_string(cxt->label, str);
@@ -52,10 +52,10 @@ index 1658782a8..64a9cd7b3 100644
static void gpt_entry_set_type(struct gpt_entry *e, struct gpt_guid *uuid)
diff --git a/libfdisk/src/parttype.c b/libfdisk/src/parttype.c
-index 110ef3ba7..5dfe51996 100644
+index d5ad434f0..ba4e994cf 100644
--- a/libfdisk/src/parttype.c
+++ b/libfdisk/src/parttype.c
-@@ -354,7 +354,7 @@ struct fdisk_parttype *fdisk_label_parse_parttype(
+@@ -335,7 +335,7 @@ struct fdisk_parttype *fdisk_label_parse_parttype(
done:
DBG(PARTTYPE, ul_debugobj(ret, "returns parsed '%s' [%s] partition type",
@@ -78,10 +78,10 @@ index 884e385ac..4bdc5729c 100644
/* fdisk_get_partition() backend */
diff --git a/libfdisk/src/sun.c b/libfdisk/src/sun.c
-index df91f543d..b1fb26d06 100644
+index 833f421a8..708e4554f 100644
--- a/libfdisk/src/sun.c
+++ b/libfdisk/src/sun.c
-@@ -819,7 +819,7 @@ static struct fdisk_parttype *sun_get_parttype(
+@@ -827,7 +827,7 @@ static struct fdisk_parttype *sun_get_parttype(
t = fdisk_label_get_parttype_from_code(cxt->label,
be16_to_cpu(sunlabel->vtoc.infos[n].id));
@@ -91,5 +91,5 @@ index df91f543d..b1fb26d06 100644
--
-2.20.1
+2.25.0
diff --git a/pkg/util-linux/patch/0002-Avoid-a-few-unnecessary-statement-expressions.patch b/pkg/util-linux/patch/0002-Avoid-a-few-unnecessary-statement-expressions.patch
@@ -1,4 +1,4 @@
-From aa429b34bbaf8fee4f8f0d625cd0b9813d9ba733 Mon Sep 17 00:00:00 2001
+From 71672deb5a3eb13f2a641f55c5a62e954b3b2252 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Tue, 18 Jun 2019 02:29:07 -0700
Subject: [PATCH] Avoid a few unnecessary statement expressions
@@ -8,10 +8,10 @@ Subject: [PATCH] Avoid a few unnecessary statement expressions
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/include/c.h b/include/c.h
-index 02e9e59fa..ec3f545ad 100644
+index 812692885..7f3a8b173 100644
--- a/include/c.h
+++ b/include/c.h
-@@ -159,9 +159,8 @@
+@@ -161,9 +161,8 @@
* @member: the name of the member within the struct.
*/
#ifndef container_of
@@ -23,7 +23,7 @@ index 02e9e59fa..ec3f545ad 100644
#endif
#ifndef HAVE_PROGRAM_INVOCATION_SHORT_NAME
-@@ -239,11 +238,11 @@ errmsg(char doexit, int excode, char adderr, const char *fmt, ...)
+@@ -241,11 +240,11 @@ errmsg(char doexit, int excode, char adderr, const char *fmt, ...)
/* Don't use inline function to avoid '#include "nls.h"' in c.h
*/
@@ -37,7 +37,7 @@ index 02e9e59fa..ec3f545ad 100644
/* After failed execvp() */
#define EX_EXEC_FAILED 126 /* Program located, but not usable. */
-@@ -364,10 +363,10 @@ static inline int xusleep(useconds_t usec)
+@@ -366,10 +365,10 @@ static inline int xusleep(useconds_t usec)
#define UTIL_LINUX_VERSION _("%s from %s\n"), program_invocation_short_name, PACKAGE_STRING
@@ -51,5 +51,5 @@ index 02e9e59fa..ec3f545ad 100644
/*
* scanf modifiers for "strings allocation"
--
-2.20.1
+2.25.0
diff --git a/pkg/util-linux/patch/0004-Remove-need-for-VLA-for-label-name.patch b/pkg/util-linux/patch/0004-Remove-need-for-VLA-for-label-name.patch
@@ -1,4 +1,4 @@
-From 7e73e83c21c9b20dadd429b06db30b2ff8ef5c2b Mon Sep 17 00:00:00 2001
+From 40ca588931ea2ef57ce2c44a3b92bf036fae827a Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Tue, 18 Jun 2019 11:54:57 -0700
Subject: [PATCH] Remove need for VLA for label name
@@ -37,7 +37,7 @@ index 6bc52d704..66c04fb6a 100644
}
return fdisk_field_get_id(fl);
diff --git a/libfdisk/src/label.c b/libfdisk/src/label.c
-index 2a11acad6..dcd35cfdc 100644
+index a18cdeaff..a976d3650 100644
--- a/libfdisk/src/label.c
+++ b/libfdisk/src/label.c
@@ -223,12 +223,14 @@ const struct fdisk_field *fdisk_label_get_field(const struct fdisk_label *lb, in
@@ -66,10 +66,10 @@ index 2a11acad6..dcd35cfdc 100644
}
diff --git a/libfdisk/src/libfdisk.h.in b/libfdisk/src/libfdisk.h.in
-index 47e778a67..09fdc4522 100644
+index 0669c0a7c..c7bc5b6d4 100644
--- a/libfdisk/src/libfdisk.h.in
+++ b/libfdisk/src/libfdisk.h.in
-@@ -423,7 +423,7 @@ extern int fdisk_label_get_fields_ids_all(
+@@ -425,7 +425,7 @@ extern int fdisk_label_get_fields_ids_all(
extern const struct fdisk_field *fdisk_label_get_field(const struct fdisk_label *lb, int id);
extern const struct fdisk_field *fdisk_label_get_field_by_name(
const struct fdisk_label *lb,
@@ -79,5 +79,5 @@ index 47e778a67..09fdc4522 100644
extern void fdisk_label_set_changed(struct fdisk_label *lb, int changed);
extern int fdisk_label_is_changed(const struct fdisk_label *lb);
--
-2.20.1
+2.25.0
diff --git a/pkg/util-linux/patch/0005-Avoid-statement-expressions-min-max.patch b/pkg/util-linux/patch/0005-Avoid-statement-expressions-min-max.patch
@@ -1,4 +1,4 @@
-From cdb8be2758e0b8082d86bd38daec78c1efb6383f Mon Sep 17 00:00:00 2001
+From 2b467498acfe9f1de27503a7ce94307755a997f5 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Tue, 12 Mar 2019 17:13:45 -0700
Subject: [PATCH] Avoid statement expressions min/max
@@ -14,10 +14,10 @@ Subject: [PATCH] Avoid statement expressions min/max
7 files changed, 23 insertions(+), 27 deletions(-)
diff --git a/include/c.h b/include/c.h
-index ec3f545ad..0b96ff1c0 100644
+index 7f3a8b173..7201b18af 100644
--- a/include/c.h
+++ b/include/c.h
-@@ -124,21 +124,17 @@
+@@ -126,21 +126,17 @@
# define FALSE 0
#endif
@@ -63,7 +63,7 @@ index 8fdab9ee9..bb31e7583 100644
}
#ifdef HAVE_WIDECHAR
diff --git a/libfdisk/src/alignment.c b/libfdisk/src/alignment.c
-index 426fa938c..964c66668 100644
+index 4ae5ff08f..931ec8b9a 100644
--- a/libfdisk/src/alignment.c
+++ b/libfdisk/src/alignment.c
@@ -38,7 +38,7 @@
@@ -103,10 +103,10 @@ index 426fa938c..964c66668 100644
cxt->grain = cxt->user_grain < granularity ? granularity : cxt->user_grain;
DBG(CXT, ul_debugobj(cxt, "new grain: %lu", cxt->grain));
diff --git a/libfdisk/src/context.c b/libfdisk/src/context.c
-index 56ebb6c1e..879ca53f3 100644
+index 743a6bc1d..0434840ab 100644
--- a/libfdisk/src/context.c
+++ b/libfdisk/src/context.c
-@@ -829,7 +829,7 @@ int fdisk_reread_changes(struct fdisk_context *cxt, struct fdisk_table *org)
+@@ -890,7 +890,7 @@ int fdisk_reread_changes(struct fdisk_context *cxt, struct fdisk_table *org)
/* the current layout */
fdisk_get_partitions(cxt, &tb);
/* maximal number of partitions */
@@ -116,10 +116,10 @@ index 56ebb6c1e..879ca53f3 100644
while (fdisk_diff_tables(org, tb, &itr, &pa, &change) == 0) {
if (change == FDISK_DIFF_UNCHANGED)
diff --git a/libfdisk/src/gpt.c b/libfdisk/src/gpt.c
-index 64a9cd7b3..497e9f00b 100644
+index a2a346faa..54984bf32 100644
--- a/libfdisk/src/gpt.c
+++ b/libfdisk/src/gpt.c
-@@ -557,7 +557,7 @@ static int gpt_mknew_pmbr(struct fdisk_context *cxt)
+@@ -421,7 +421,7 @@ static int gpt_mknew_pmbr(struct fdisk_context *cxt)
pmbr->partition_record[0].end_track = 0xFF;
pmbr->partition_record[0].starting_lba = cpu_to_le32(1);
pmbr->partition_record[0].size_in_lba =
@@ -128,8 +128,8 @@ index 64a9cd7b3..497e9f00b 100644
return 0;
}
-@@ -903,7 +903,7 @@ static int valid_pmbr(struct fdisk_context *cxt)
- /* Note that gpt_write_pmbr() overwrites PMBR, but we want to keep it valid already
+@@ -770,7 +770,7 @@ static int valid_pmbr(struct fdisk_context *cxt)
+ /* Note that gpt_write_pmbr() overwrites PMBR, but we want to keep it valid already
* in memory too to disable warnings when valid_pmbr() called next time */
pmbr->partition_record[part].size_in_lba =
- cpu_to_le32((uint32_t) min( cxt->total_sectors - 1ULL, 0xFFFFFFFFULL) );
@@ -138,7 +138,7 @@ index 64a9cd7b3..497e9f00b 100644
}
}
diff --git a/libsmartcols/src/calculate.c b/libsmartcols/src/calculate.c
-index 9426ebb05..da1ffa8fc 100644
+index a0c0dc4b9..ad48f619c 100644
--- a/libsmartcols/src/calculate.c
+++ b/libsmartcols/src/calculate.c
@@ -55,7 +55,7 @@ static int count_cell_width(struct libscols_table *tb,
@@ -186,5 +186,5 @@ index 4b42938f6..81fe76000 100644
}
--
-2.20.1
+2.25.0
diff --git a/pkg/util-linux/patch/0006-Avoid-initialization-of-flexible-array-in-struct.patch b/pkg/util-linux/patch/0006-Avoid-initialization-of-flexible-array-in-struct.patch
@@ -0,0 +1,97 @@
+From 56273e92326b26a326c73e47b3d5929bbce9ac03 Mon Sep 17 00:00:00 2001
+From: Michael Forney <mforney@mforney.org>
+Date: Mon, 24 Jun 2019 22:48:57 -0700
+Subject: [PATCH] Avoid initialization of flexible array in struct
+
+---
+ disk-utils/fdisk-menu.c | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/disk-utils/fdisk-menu.c b/disk-utils/fdisk-menu.c
+index 71355f684..fb5b2e253 100644
+--- a/disk-utils/fdisk-menu.c
++++ b/disk-utils/fdisk-menu.c
+@@ -37,7 +37,7 @@ struct menu {
+ const struct menu *,
+ const struct menu_entry *);
+
+- struct menu_entry entries[]; /* NULL terminated array */
++ struct menu_entry *entries; /* NULL terminated array */
+ };
+
+ struct menu_context {
+@@ -92,7 +92,7 @@ DECLARE_MENU_CB(generic_menu_cb);
+ /* Generic menu */
+ static const struct menu menu_generic = {
+ .callback = generic_menu_cb,
+- .entries = {
++ .entries = (struct menu_entry[]){
+ MENU_BSEP(N_("Generic")),
+ MENU_ENT ('d', N_("delete a partition")),
+ MENU_ENT ('F', N_("list free unpartitioned space")),
+@@ -134,7 +134,7 @@ static const struct menu menu_createlabel = {
+ .callback = createlabel_menu_cb,
+ .exclude = FDISK_DISKLABEL_BSD,
+ .nonested = 1,
+- .entries = {
++ .entries = (struct menu_entry[]){
+ MENU_SEP(N_("Create a new label")),
+ MENU_ENT('g', N_("create a new empty GPT partition table")),
+ MENU_ENT('G', N_("create a new empty SGI (IRIX) partition table")),
+@@ -151,7 +151,7 @@ static const struct menu menu_createlabel = {
+ static const struct menu menu_geo = {
+ .callback = geo_menu_cb,
+ .exclude = FDISK_DISKLABEL_GPT | FDISK_DISKLABEL_BSD,
+- .entries = {
++ .entries = (struct menu_entry[]){
+ MENU_XSEP(N_("Geometry (for the current label)")),
+ MENU_XENT('c', N_("change number of cylinders")),
+ MENU_XENT('h', N_("change number of heads")),
+@@ -163,7 +163,7 @@ static const struct menu menu_geo = {
+ static const struct menu menu_gpt = {
+ .callback = gpt_menu_cb,
+ .label = FDISK_DISKLABEL_GPT,
+- .entries = {
++ .entries = (struct menu_entry[]){
+ MENU_BSEP(N_("GPT")),
+ MENU_XENT('i', N_("change disk GUID")),
+ MENU_XENT('n', N_("change partition name")),
+@@ -184,7 +184,7 @@ static const struct menu menu_gpt = {
+ static const struct menu menu_sun = {
+ .callback = sun_menu_cb,
+ .label = FDISK_DISKLABEL_SUN,
+- .entries = {
++ .entries = (struct menu_entry[]){
+ MENU_BSEP(N_("Sun")),
+ MENU_ENT('a', N_("toggle the read-only flag")),
+ MENU_ENT('c', N_("toggle the mountable flag")),
+@@ -201,7 +201,7 @@ static const struct menu menu_sun = {
+ static const struct menu menu_sgi = {
+ .callback = sgi_menu_cb,
+ .label = FDISK_DISKLABEL_SGI,
+- .entries = {
++ .entries = (struct menu_entry[]){
+ MENU_SEP(N_("SGI")),
+ MENU_ENT('a', N_("select bootable partition")),
+ MENU_ENT('b', N_("edit bootfile entry")),
+@@ -214,7 +214,7 @@ static const struct menu menu_sgi = {
+ static const struct menu menu_dos = {
+ .callback = dos_menu_cb,
+ .label = FDISK_DISKLABEL_DOS,
+- .entries = {
++ .entries = (struct menu_entry[]){
+ MENU_BSEP(N_("DOS (MBR)")),
+ MENU_ENT('a', N_("toggle a bootable flag")),
+ MENU_ENT('b', N_("edit nested BSD disklabel")),
+@@ -232,7 +232,7 @@ static const struct menu menu_dos = {
+ static const struct menu menu_bsd = {
+ .callback = bsd_menu_cb,
+ .label = FDISK_DISKLABEL_BSD,
+- .entries = {
++ .entries = (struct menu_entry[]){
+ MENU_SEP(N_("BSD")),
+ MENU_ENT('e', N_("edit drive data")),
+ MENU_ENT('i', N_("install bootstrap")),
+--
+2.25.0
+
diff --git a/pkg/util-linux/patch/0006-Revert-lib-loopdev.c-Inline-loopcxt_has_device.patch b/pkg/util-linux/patch/0006-Revert-lib-loopdev.c-Inline-loopcxt_has_device.patch
@@ -1,28 +0,0 @@
-From 91696aa317a78a594ca8ae6e6a810fe778490e6a Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Tue, 18 Jun 2019 22:05:16 +0200
-Subject: [PATCH] Revert "lib/loopdev.c: Inline loopcxt_has_device"
-
-... no caller in that file, this change has no effect.
-
-This reverts commit 3bb960c7b5f1428f1bff885b2667787e8af5001b.
----
- lib/loopdev.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/loopdev.c b/lib/loopdev.c
-index ede1b5cdc..99a093926 100644
---- a/lib/loopdev.c
-+++ b/lib/loopdev.c
-@@ -127,7 +127,7 @@ int loopcxt_set_device(struct loopdev_cxt *lc, const char *device)
- return 0;
- }
-
--inline int loopcxt_has_device(struct loopdev_cxt *lc)
-+int loopcxt_has_device(struct loopdev_cxt *lc)
- {
- return lc && *lc->device;
- }
---
-2.20.1
-
diff --git a/pkg/util-linux/patch/0007-Avoid-initialization-of-flexible-array-in-struct.patch b/pkg/util-linux/patch/0007-Avoid-initialization-of-flexible-array-in-struct.patch
@@ -1,97 +0,0 @@
-From 8dac421210d9f0b49ac39287ace471a45faab352 Mon Sep 17 00:00:00 2001
-From: Michael Forney <mforney@mforney.org>
-Date: Mon, 24 Jun 2019 22:48:57 -0700
-Subject: [PATCH] Avoid initialization of flexible array in struct
-
----
- disk-utils/fdisk-menu.c | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/disk-utils/fdisk-menu.c b/disk-utils/fdisk-menu.c
-index cd104e20b..58abb16a6 100644
---- a/disk-utils/fdisk-menu.c
-+++ b/disk-utils/fdisk-menu.c
-@@ -37,7 +37,7 @@ struct menu {
- const struct menu *,
- const struct menu_entry *);
-
-- struct menu_entry entries[]; /* NULL terminated array */
-+ struct menu_entry *entries; /* NULL terminated array */
- };
-
- struct menu_context {
-@@ -93,7 +93,7 @@ DECLARE_MENU_CB(generic_menu_cb);
- /* Generic menu */
- static const struct menu menu_generic = {
- .callback = generic_menu_cb,
-- .entries = {
-+ .entries = (struct menu_entry[]){
- MENU_BSEP(N_("Generic")),
- MENU_ENT ('d', N_("delete a partition")),
- MENU_ENT ('F', N_("list free unpartitioned space")),
-@@ -133,7 +133,7 @@ static const struct menu menu_createlabel = {
- .callback = createlabel_menu_cb,
- .exclude = FDISK_DISKLABEL_BSD,
- .nonested = 1,
-- .entries = {
-+ .entries = (struct menu_entry[]){
- MENU_SEP(N_("Create a new label")),
- MENU_ENT('g', N_("create a new empty GPT partition table")),
- MENU_ENT('G', N_("create a new empty SGI (IRIX) partition table")),
-@@ -150,7 +150,7 @@ static const struct menu menu_createlabel = {
- static const struct menu menu_geo = {
- .callback = geo_menu_cb,
- .exclude = FDISK_DISKLABEL_GPT | FDISK_DISKLABEL_BSD,
-- .entries = {
-+ .entries = (struct menu_entry[]){
- MENU_XSEP(N_("Geometry (for the current label)")),
- MENU_XENT('c', N_("change number of cylinders")),
- MENU_XENT('h', N_("change number of heads")),
-@@ -162,7 +162,7 @@ static const struct menu menu_geo = {
- static const struct menu menu_gpt = {
- .callback = gpt_menu_cb,
- .label = FDISK_DISKLABEL_GPT,
-- .entries = {
-+ .entries = (struct menu_entry[]){
- MENU_BSEP(N_("GPT")),
- MENU_XENT('i', N_("change disk GUID")),
- MENU_XENT('n', N_("change partition name")),
-@@ -183,7 +183,7 @@ static const struct menu menu_gpt = {
- static const struct menu menu_sun = {
- .callback = sun_menu_cb,
- .label = FDISK_DISKLABEL_SUN,
-- .entries = {
-+ .entries = (struct menu_entry[]){
- MENU_BSEP(N_("Sun")),
- MENU_ENT('a', N_("toggle the read-only flag")),
- MENU_ENT('c', N_("toggle the mountable flag")),
-@@ -200,7 +200,7 @@ static const struct menu menu_sun = {
- static const struct menu menu_sgi = {
- .callback = sgi_menu_cb,
- .label = FDISK_DISKLABEL_SGI,
-- .entries = {
-+ .entries = (struct menu_entry[]){
- MENU_SEP(N_("SGI")),
- MENU_ENT('a', N_("select bootable partition")),
- MENU_ENT('b', N_("edit bootfile entry")),
-@@ -213,7 +213,7 @@ static const struct menu menu_sgi = {
- static const struct menu menu_dos = {
- .callback = dos_menu_cb,
- .label = FDISK_DISKLABEL_DOS,
-- .entries = {
-+ .entries = (struct menu_entry[]){
- MENU_BSEP(N_("DOS (MBR)")),
- MENU_ENT('a', N_("toggle a bootable flag")),
- MENU_ENT('b', N_("edit nested BSD disklabel")),
-@@ -231,7 +231,7 @@ static const struct menu menu_dos = {
- static const struct menu menu_bsd = {
- .callback = bsd_menu_cb,
- .label = FDISK_DISKLABEL_BSD,
-- .entries = {
-+ .entries = (struct menu_entry[]){
- MENU_SEP(N_("BSD")),
- MENU_ENT('e', N_("edit drive data")),
- MENU_ENT('i', N_("install bootstrap")),
---
-2.22.0
-
diff --git a/pkg/util-linux/patch/0007-Use-MAXIMUM_PARTS-instead-of-VLA.patch b/pkg/util-linux/patch/0007-Use-MAXIMUM_PARTS-instead-of-VLA.patch
@@ -0,0 +1,28 @@
+From eed6c30243fef046d6079c5c84266885268d2fcd Mon Sep 17 00:00:00 2001
+From: Michael Forney <mforney@mforney.org>
+Date: Mon, 24 Jun 2019 23:41:53 -0700
+Subject: [PATCH] Use MAXIMUM_PARTS instead of VLA
+
+This is the upper bound on the pte array, so just use it as the
+static array length.
+---
+ libfdisk/src/dos.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c
+index 4a2cd946b..badc7ef28 100644
+--- a/libfdisk/src/dos.c
++++ b/libfdisk/src/dos.c
+@@ -1530,8 +1530,7 @@ static int dos_verify_disklabel(struct fdisk_context *cxt)
+ {
+ size_t i, j;
+ fdisk_sector_t total = 1, n_sectors = cxt->total_sectors;
+- fdisk_sector_t first[cxt->label->nparts_max],
+- last[cxt->label->nparts_max];
++ fdisk_sector_t first[MAXIMUM_PARTS], last[MAXIMUM_PARTS];
+ struct dos_partition *p;
+ struct fdisk_dos_label *l = self_label(cxt);
+
+--
+2.25.0
+
diff --git a/pkg/util-linux/patch/0008-Use-MAXIMUM_PARTS-instead-of-VLA.patch b/pkg/util-linux/patch/0008-Use-MAXIMUM_PARTS-instead-of-VLA.patch
@@ -1,28 +0,0 @@
-From b0a9d92b358b22ef7759f16aca681a7b99935f22 Mon Sep 17 00:00:00 2001
-From: Michael Forney <mforney@mforney.org>
-Date: Mon, 24 Jun 2019 23:41:53 -0700
-Subject: [PATCH] Use MAXIMUM_PARTS instead of VLA
-
-This is the upper bound on the pte array, so just use it as the
-static array length.
----
- libfdisk/src/dos.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c
-index 2543edc04..1ba95c34a 100644
---- a/libfdisk/src/dos.c
-+++ b/libfdisk/src/dos.c
-@@ -1543,8 +1543,7 @@ static int dos_verify_disklabel(struct fdisk_context *cxt)
- {
- size_t i, j;
- fdisk_sector_t total = 1, n_sectors = cxt->total_sectors;
-- fdisk_sector_t first[cxt->label->nparts_max],
-- last[cxt->label->nparts_max];
-+ fdisk_sector_t first[MAXIMUM_PARTS], last[MAXIMUM_PARTS];
- struct dos_partition *p;
- struct fdisk_dos_label *l = self_label(cxt);
-
---
-2.22.0
-
diff --git a/pkg/util-linux/patch/0008-Use-alloca-if-VLAs-aren-t-supported.patch b/pkg/util-linux/patch/0008-Use-alloca-if-VLAs-aren-t-supported.patch
@@ -0,0 +1,28 @@
+From ab9ac99af70f341362ca9afa7d2fad22b6b02ca2 Mon Sep 17 00:00:00 2001
+From: Michael Forney <mforney@mforney.org>
+Date: Mon, 24 Jun 2019 23:54:21 -0700
+Subject: [PATCH] Use alloca if VLAs aren't supported
+
+---
+ lib/path.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/lib/path.c b/lib/path.c
+index 64bf7c6f0..786b709ae 100644
+--- a/lib/path.c
++++ b/lib/path.c
+@@ -968,7 +968,11 @@ static int ul_path_cpuparse(struct path_cxt *pc, cpu_set_t **set, int maxcpus, i
+ {
+ FILE *f;
+ size_t setsize, len = maxcpus * 7;
++#ifndef __STDC_NO_VLA__
+ char buf[len];
++#else
++ char *buf = alloca(len);
++#endif
+ int rc;
+
+ *set = NULL;
+--
+2.25.0
+
diff --git a/pkg/util-linux/patch/0009-Use-alloca-if-VLAs-aren-t-supported.patch b/pkg/util-linux/patch/0009-Use-alloca-if-VLAs-aren-t-supported.patch
@@ -1,28 +0,0 @@
-From 7e547e0c1525165a860872503a5b461278ab2299 Mon Sep 17 00:00:00 2001
-From: Michael Forney <mforney@mforney.org>
-Date: Mon, 24 Jun 2019 23:54:21 -0700
-Subject: [PATCH] Use alloca if VLAs aren't supported
-
----
- lib/path.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/lib/path.c b/lib/path.c
-index f7fd19592..ecbd59e14 100644
---- a/lib/path.c
-+++ b/lib/path.c
-@@ -927,7 +927,11 @@ static int ul_path_cpuparse(struct path_cxt *pc, cpu_set_t **set, int maxcpus, i
- {
- FILE *f;
- size_t setsize, len = maxcpus * 7;
-+#ifndef __STDC_NO_VLA__
- char buf[len];
-+#else
-+ char *buf = alloca(len);
-+#endif
- int rc;
-
- *set = NULL;
---
-2.22.0
-
diff --git a/pkg/util-linux/patch/0009-Use-static-inline-function-for-cmp_numbers.patch b/pkg/util-linux/patch/0009-Use-static-inline-function-for-cmp_numbers.patch
@@ -0,0 +1,37 @@
+From 57af96ed8831118d42647b5dafcdf4f296877074 Mon Sep 17 00:00:00 2001
+From: Michael Forney <mforney@mforney.org>
+Date: Tue, 25 Jun 2019 00:13:43 -0700
+Subject: [PATCH] Use static inline function for cmp_numbers
+
+All callers use it with an unsigned type, so just specialize for
+uintmax_t.
+---
+ include/c.h | 12 +++++-------
+ 1 file changed, 5 insertions(+), 7 deletions(-)
+
+diff --git a/include/c.h b/include/c.h
+index 7201b18af..549f1fa24 100644
+--- a/include/c.h
++++ b/include/c.h
+@@ -138,13 +138,11 @@ umin(uintmax_t x, uintmax_t y)
+ return x < y ? x : y;
+ }
+
+-#ifndef cmp_numbers
+-# define cmp_numbers(x, y) __extension__ ({ \
+- __typeof__(x) _a = (x); \
+- __typeof__(y) _b = (y); \
+- (void) (&_a == &_b); \
+- _a == _b ? 0 : _a > _b ? 1 : -1; })
+-#endif
++static inline uintmax_t
++cmp_numbers(uintmax_t x, uintmax_t y)
++{
++ return x == y ? 0 : x > y ? 1 : -1;
++}
+
+ #ifndef offsetof
+ #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+--
+2.25.0
+
diff --git a/pkg/util-linux/patch/0010-Use-static-inline-function-for-cmp_numbers.patch b/pkg/util-linux/patch/0010-Use-static-inline-function-for-cmp_numbers.patch
@@ -1,37 +0,0 @@
-From 324b036444402fd2f008c1bfe979ea4281827313 Mon Sep 17 00:00:00 2001
-From: Michael Forney <mforney@mforney.org>
-Date: Tue, 25 Jun 2019 00:13:43 -0700
-Subject: [PATCH] Use static inline function for cmp_numbers
-
-All callers use it with an unsigned type, so just specialize for
-uintmax_t.
----
- include/c.h | 12 +++++-------
- 1 file changed, 5 insertions(+), 7 deletions(-)
-
-diff --git a/include/c.h b/include/c.h
-index 0b96ff1c0..9787ec341 100644
---- a/include/c.h
-+++ b/include/c.h
-@@ -136,13 +136,11 @@ umin(uintmax_t x, uintmax_t y)
- return x < y ? x : y;
- }
-
--#ifndef cmp_numbers
--# define cmp_numbers(x, y) __extension__ ({ \
-- __typeof__(x) _a = (x); \
-- __typeof__(y) _b = (y); \
-- (void) (&_a == &_b); \
-- _a == _b ? 0 : _a > _b ? 1 : -1; })
--#endif
-+static inline uintmax_t
-+cmp_numbers(uintmax_t x, uintmax_t y)
-+{
-+ return x == y ? 0 : x > y ? 1 : -1;
-+}
-
- #ifndef offsetof
- #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
---
-2.22.0
-
diff --git a/pkg/util-linux/ver b/pkg/util-linux/ver
@@ -1 +1 @@
-2.34 r2
+2.35 r0