]> sourceware.org Git - lvm2.git/commitdiff
lvmcmd2lib: support new command
authorZdenek Kabelac <zkabelac@redhat.com>
Wed, 18 Jan 2017 08:53:46 +0000 (09:53 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 20 Jan 2017 22:55:07 +0000 (23:55 +0100)
Internal command which reads lvm.conf settins and passes it
via envvar to dmeventd monitoring thread.

WHATS_NEW
tools/lvmcmdlib.c

index e5b735fdf3cd31e1e4ee543fbd68a7db855124b4..94411ae083253307f1cffff20cbf261fd6ba51d2 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.169 - 
 =====================================
+  Support new internal command _dmeventd_thin_command.
   Introduce new dmeventd/thin_command configurable setting.
   Use new default units 'r' for displaying sizes.
   Also unmount mount point on top of MD device if using blkdeactivate -u.
index 276c8b357116b58e1e7e5ba54fed46a37263e10a..024376826374d8abfcfd0c7e322ceba8bf259258 100644 (file)
@@ -83,7 +83,10 @@ int lvm2_run(void *handle, const char *cmdline)
                memlock_inc_daemon(cmd);
        } else if (!strcmp(cmdline, "_memlock_dec"))
                memlock_dec_daemon(cmd);
-       else
+       else if (!strcmp(cmdline, "_dmeventd_thin_command")) {
+               if (setenv(cmdline, find_config_tree_str(cmd, dmeventd_thin_command_CFG, NULL), 1))
+                       ret = ECMD_FAILED;
+       } else
                ret = lvm_run_command(cmd, argc, argv);
 
       out:
This page took 0.03622 seconds and 5 git commands to generate.