1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-15 11:53:59 +02:00
openwrt-packages/utils/lvm2/patches/002-const-stdio.patch
Daniel Golle 68adeddf31 lvm2: update LVM2 to 2.03.17 and DM to 1.02.187
Version 2.03.17 - 10th November 2022
====================================
  Add new options (--fs, --fsmode) for FS handling when resizing LVs.
  Fix 'lvremove -S|--select LV' to not also remove its historical LV right away.
  Fix lv_active field type to binary so --select and --binary applies properly.
  Switch to use mallinfo2 and use it only with glibc.
  Error out in lvm shell if using a cmd argument not supported in the shell.
  Fix lvm shell's lastlog command to report previous pre-command failures.
  Extend VDO and VDOPOOL without flushing and locking fs.
  Add --valuesonly option to lvmconfig to print only values without keys.
  Updates configure with recent autoconf tooling.
  Fix lvconvert --test --type vdo-pool execution.
  Add json_std output format for more JSON standard compliant version of output.
  Fix vdo_slab_size_mb value for converted VDO volume.
  Fix many corner cases in device_id, including handling of S/N duplicates.
  Fix various issues in lvmdbusd.

libdm changes:
Version 1.02.187 - 10th November 2022
=====================================
  Add DM_REPORT_GROUP_JSON_STD for more JSON standard compliant output format.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-12-20 01:41:02 +00:00

44 lines
1.2 KiB
Diff

--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
@@ -1667,7 +1667,7 @@ struct cmd_context *create_toolcontext(u
/* FIXME Make this configurable? */
reset_lvm_errno(1);
-#ifndef VALGRIND_POOL
+#if defined(__GLIBC__) && !defined(VALGRIND_POOL)
/* Set in/out stream buffering before glibc */
if (set_buffering
#ifdef SYS_gettid
@@ -2045,7 +2045,7 @@ void destroy_toolcontext(struct cmd_cont
dm_hash_destroy(cmd->cft_def_hash);
dm_device_list_destroy(&cmd->cache_dm_devs);
-#ifndef VALGRIND_POOL
+#if defined(__GLIBC__) && !defined(VALGRIND_POOL)
if (cmd->linebuffer) {
/* Reset stream buffering to defaults */
if (is_valid_fd(STDIN_FILENO) &&
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -3419,6 +3419,7 @@ int lvm_split(char *str, int *argc, char
/* Make sure we have always valid filedescriptors 0,1,2 */
static int _check_standard_fds(void)
{
+#ifdef __GLIBC__
int err = is_valid_fd(STDERR_FILENO);
if (!is_valid_fd(STDIN_FILENO) &&
@@ -3445,6 +3446,12 @@ static int _check_standard_fds(void)
strerror(errno));
return 0;
}
+#else
+ if (!is_valid_fd(STDERR_FILENO) ||
+ !is_valid_fd(STDOUT_FILENO) ||
+ !is_valid_fd(STDIN_FILENO))
+ return 0;
+#endif
return 1;
}