master - lvmconfig: Add options to produce file preamble
by Alasdair Kergon
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=fe423ef583a48ca0f78...
Commit: fe423ef583a48ca0f780156ec5f1fe33716318ad
Parent: 827be01758ec5adb7b9d5ea75b658092adc65534
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Sat Aug 5 16:18:36 2017 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Sat Aug 5 16:23:34 2017 +0100
lvmconfig: Add options to produce file preamble
Use --withgeneralpreamble and --withlocalpreamble instead of
concatenating files.
---
WHATS_NEW | 3 +-
conf/Makefile.in | 4 +-
conf/example.conf.base | 23 ---------------------
conf/lvmlocal.conf.base | 19 ------------------
lib/config/config.c | 6 +++++
lib/config/config.h | 3 ++
lib/config/config_settings.h | 44 ++++++++++++++++++++++++++++++++++++++++++
man/lvmconfig.8_pregen | 20 +++++++++++++++++++
tools/args.h | 6 +++++
tools/command-lines.in | 2 +-
tools/dumpconfig.c | 16 +++++++++++++++
11 files changed, 100 insertions(+), 46 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 46a944b..ebbc7d1 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,6 +1,7 @@
Version 2.02.174 -
=================================
- Imporove makefiles' linking.
+ Add --withgeneralpreamble and --withlocalpreamble to lvmconfig.
+ Improve makefiles' linking.
Fix some paths in generated makefiles to respected configured settings.
Add warning when creating thin-pool with zeroing and chunk size >= 512KiB.
Introduce exit code 4 EINIT_FAILED to replace -1 when initialisation fails.
diff --git a/conf/Makefile.in b/conf/Makefile.in
index c8fee3e..5330c07 100644
--- a/conf/Makefile.in
+++ b/conf/Makefile.in
@@ -32,8 +32,8 @@ include $(top_builddir)/make.tmpl
.PHONY: install_conf install_localconf install_profiles
generate:
- (cat $(top_srcdir)/conf/example.conf.base && LD_LIBRARY_PATH=$(top_builddir)/libdm:$(LD_LIBRARY_PATH) $(top_builddir)/tools/lvm dumpconfig --type default --unconfigured --withcomments --ignorelocal --withspaces) > example.conf.in
- (cat $(top_srcdir)/conf/lvmlocal.conf.base && LD_LIBRARY_PATH=$(top_builddir)/libdm:$(LD_LIBRARY_PATH) $(top_builddir)/tools/lvm dumpconfig --type default --unconfigured --withcomments --withspaces local) > lvmlocal.conf.in
+ LD_LIBRARY_PATH=$(top_builddir)/libdm:$(LD_LIBRARY_PATH) $(top_builddir)/tools/lvm dumpconfig --type default --unconfigured --withgeneralpreamble --withcomments --ignorelocal --withspaces > example.conf.in
+ LD_LIBRARY_PATH=$(top_builddir)/libdm:$(LD_LIBRARY_PATH) $(top_builddir)/tools/lvm dumpconfig --type default --unconfigured --withlocalpreamble --withcomments --withspaces local > lvmlocal.conf.in
install_conf: $(CONFSRC)
@if [ ! -e $(confdir)/$(CONFDEST) ]; then \
diff --git a/conf/example.conf.base b/conf/example.conf.base
deleted file mode 100644
index 5c49899..0000000
--- a/conf/example.conf.base
+++ /dev/null
@@ -1,23 +0,0 @@
-# This is an example configuration file for the LVM2 system.
-# It contains the default settings that would be used if there was no
-# @DEFAULT_SYS_DIR(a)/lvm.conf file.
-#
-# Refer to 'man lvm.conf' for further information including the file layout.
-#
-# Refer to 'man lvm.conf' for information about how settings configured in
-# this file are combined with built-in values and command line options to
-# arrive at the final values used by LVM.
-#
-# Refer to 'man lvmconfig' for information about displaying the built-in
-# and configured values used by LVM.
-#
-# If a default value is set in this file (not commented out), then a
-# new version of LVM using this file will continue using that value,
-# even if the new version of LVM changes the built-in default value.
-#
-# To put this file in a different directory and override @DEFAULT_SYS_DIR@ set
-# the environment variable LVM_SYSTEM_DIR before running the tools.
-#
-# N.B. Take care that each setting only appears once if uncommenting
-# example settings in this file.
-
diff --git a/conf/lvmlocal.conf.base b/conf/lvmlocal.conf.base
deleted file mode 100644
index e2a9e2f..0000000
--- a/conf/lvmlocal.conf.base
+++ /dev/null
@@ -1,19 +0,0 @@
-# This is a local configuration file template for the LVM2 system
-# which should be installed as @DEFAULT_SYS_DIR(a)/lvmlocal.conf .
-#
-# Refer to 'man lvm.conf' for information about the file layout.
-#
-# To put this file in a different directory and override
-# @DEFAULT_SYS_DIR@ set the environment variable LVM_SYSTEM_DIR before
-# running the tools.
-#
-# The lvmlocal.conf file is normally expected to contain only the
-# "local" section which contains settings that should not be shared or
-# repeated among different hosts. (But if other sections are present,
-# they *will* get processed. Settings in this file override equivalent
-# ones in lvm.conf and are in turn overridden by ones in any enabled
-# lvm_<tag>.conf files.)
-#
-# Please take care that each setting only appears once if uncommenting
-# example settings in this file and never copy this file between hosts.
-
diff --git a/lib/config/config.c b/lib/config/config.c
index 04dded7..1f18969 100644
--- a/lib/config/config.c
+++ b/lib/config/config.c
@@ -1880,6 +1880,12 @@ int config_write(struct dm_config_tree *cft,
}
log_verbose("Dumping configuration to %s", file);
+
+ if (tree_spec->withgeneralpreamble)
+ fprintf(baton.fp, CFG_PREAMBLE_GENERAL);
+ if (tree_spec->withlocalpreamble)
+ fprintf(baton.fp, CFG_PREAMBLE_LOCAL);
+
if (!argc) {
if (!dm_config_write_node_out(cft->root, &_out_spec, &baton)) {
log_error("Failure while writing to %s", file);
diff --git a/lib/config/config.h b/lib/config/config.h
index 8a7d6c3..901994a 100644
--- a/lib/config/config.h
+++ b/lib/config/config.h
@@ -141,6 +141,7 @@ typedef struct cfg_def_item {
uint16_t deprecated_since_version; /* version since this item is deprecated */
const char *deprecation_comment; /* comment about reasons for deprecation and settings that supersede this one */
const char *comment; /* comment */
+ const char *file_premable; /* comment text to use at the start of the file */
} cfg_def_item_t;
/* configuration definition tree types */
@@ -173,6 +174,8 @@ struct config_def_tree_spec {
unsigned withversions:1; /* include versions */
unsigned withspaces:1; /* add more spaces in output for better readability */
unsigned unconfigured:1; /* use unconfigured path strings */
+ unsigned withgeneralpreamble:1; /* include preamble for a general config file */
+ unsigned withlocalpreamble:1; /* include preamble for a local config file */
uint8_t *check_status; /* status of last tree check (currently needed for CFG_DEF_TREE_MISSING only) */
};
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 40b64ab..7d800b3 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -121,6 +121,30 @@
cfg_section(root_CFG_SECTION, "(root)", root_CFG_SECTION, 0, vsn(0, 0, 0), 0, NULL, NULL)
+#define CFG_PREAMBLE_GENERAL \
+ "# This is an example configuration file for the LVM2 system.\n" \
+ "# It contains the default settings that would be used if there was no\n" \
+ "# @DEFAULT_SYS_DIR(a)/lvm.conf file.\n" \
+ "#\n" \
+ "# Refer to 'man lvm.conf' for further information including the file layout.\n" \
+ "#\n" \
+ "# Refer to 'man lvm.conf' for information about how settings configured in\n" \
+ "# this file are combined with built-in values and command line options to\n" \
+ "# arrive at the final values used by LVM.\n" \
+ "#\n" \
+ "# Refer to 'man lvmconfig' for information about displaying the built-in\n" \
+ "# and configured values used by LVM.\n" \
+ "#\n" \
+ "# If a default value is set in this file (not commented out), then a\n" \
+ "# new version of LVM using this file will continue using that value,\n" \
+ "# even if the new version of LVM changes the built-in default value.\n" \
+ "#\n" \
+ "# To put this file in a different directory and override @DEFAULT_SYS_DIR@ set\n" \
+ "# the environment variable LVM_SYSTEM_DIR before running the tools.\n" \
+ "#\n" \
+ "# N.B. Take care that each setting only appears once if uncommenting\n" \
+ "# example settings in this file.\n\n"
+
cfg_section(config_CFG_SECTION, "config", root_CFG_SECTION, 0, vsn(2, 2, 99), 0, NULL,
"How LVM configuration settings are handled.\n")
@@ -161,6 +185,26 @@ cfg_section(tags_CFG_SECTION, "tags", root_CFG_SECTION, CFG_DEFAULT_COMMENTED, v
cfg_section(local_CFG_SECTION, "local", root_CFG_SECTION, 0, vsn(2, 2, 117), 0, NULL,
"LVM settings that are specific to the local host.\n")
+#define CFG_PREAMBLE_LOCAL \
+ "# This is a local configuration file template for the LVM2 system\n" \
+ "# which should be installed as @DEFAULT_SYS_DIR(a)/lvmlocal.conf .\n" \
+ "#\n" \
+ "# Refer to 'man lvm.conf' for information about the file layout.\n" \
+ "#\n" \
+ "# To put this file in a different directory and override\n" \
+ "# @DEFAULT_SYS_DIR@ set the environment variable LVM_SYSTEM_DIR before\n" \
+ "# running the tools.\n" \
+ "#\n" \
+ "# The lvmlocal.conf file is normally expected to contain only the\n" \
+ "# \"local\" section which contains settings that should not be shared or\n" \
+ "# repeated among different hosts. (But if other sections are present,\n" \
+ "# they *will* get processed. Settings in this file override equivalent\n" \
+ "# ones in lvm.conf and are in turn overridden by ones in any enabled\n" \
+ "# lvm_<tag>.conf files.)\n" \
+ "#\n" \
+ "# Please take care that each setting only appears once if uncommenting\n" \
+ "# example settings in this file and never copy this file between hosts.\n\n"
+
cfg(config_checks_CFG, "checks", config_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 2, 99), NULL, 0, NULL,
"If enabled, any LVM configuration mismatch is reported.\n"
"This implies checking that the configuration key is understood by\n"
diff --git a/man/lvmconfig.8_pregen b/man/lvmconfig.8_pregen
index 3c3e25f..c60f899 100644
--- a/man/lvmconfig.8_pregen
+++ b/man/lvmconfig.8_pregen
@@ -79,6 +79,14 @@ line settings from --config.
.ad b
.br
.ad l
+[ \fB--withgeneralpreamble\fP ]
+.ad b
+.br
+.ad l
+[ \fB--withlocalpreamble\fP ]
+.ad b
+.br
+.ad l
[ \fB--withspaces\fP ]
.ad b
.br
@@ -389,6 +397,18 @@ settings, also display comments about deprecation.
.ad b
.HP
.ad l
+\fB--withgeneralpreamble\fP
+.br
+Display general file preamble at start of output.
+.ad b
+.HP
+.ad l
+\fB--withlocalpreamble\fP
+.br
+Display local file preamble at start of output.
+.ad b
+.HP
+.ad l
\fB--withspaces\fP
.br
Where appropriate, add more spaces in output for better readability.
diff --git a/tools/args.h b/tools/args.h
index f5e864f..89d84b4 100644
--- a/tools/args.h
+++ b/tools/args.h
@@ -783,6 +783,12 @@ arg(withcomments_ARG, '\0', "withcomments", 0, 0, 0,
"Display a full comment for each configuration node. For deprecated\n"
"settings, also display comments about deprecation.\n")
+arg(withgeneralpreamble_ARG, '\0', "withgeneralpreamble", 0, 0, 0,
+ "Include general config file preamble.\n")
+
+arg(withlocalpreamble_ARG, '\0', "withlocalpreamble", 0, 0, 0,
+ "Include local config file preamble.\n")
+
arg(withspaces_ARG, '\0', "withspaces", 0, 0, 0,
"Where appropriate, add more spaces in output for better readability.\n")
diff --git a/tools/command-lines.in b/tools/command-lines.in
index 6e9192e..1ef234e 100644
--- a/tools/command-lines.in
+++ b/tools/command-lines.in
@@ -206,7 +206,7 @@ OO_REPORT: --aligned, --all, --binary, --configreport ConfigReport, --foreign,
OO_CONFIG: --atversion String, --typeconfig ConfigType, --file String, --ignoreadvanced,
--ignoreunsupported, --ignorelocal, --list, --mergedconfig, --metadataprofile String,
--sinceversion String, --showdeprecated, --showunsupported, --validate, --withsummary,
---withcomments, --withspaces, --unconfigured, --withversions
+--withcomments, --withgeneralpreamble, --withlocalpreamble, --withspaces, --unconfigured, --withversions
---
diff --git a/tools/dumpconfig.c b/tools/dumpconfig.c
index e387e60..9e4408e 100644
--- a/tools/dumpconfig.c
+++ b/tools/dumpconfig.c
@@ -234,6 +234,14 @@ int dumpconfig(struct cmd_context *cmd, int argc, char **argv)
log_error("--withcomments has no effect with --type list");
return EINVALID_CMD_LINE;
}
+ if (arg_is_set(cmd, withlocalpreamble_ARG)) {
+ log_error("--withlocalpreamble has no effect with --type list");
+ return EINVALID_CMD_LINE;
+ }
+ if (arg_is_set(cmd, withgeneralpreamble_ARG)) {
+ log_error("--withgeneralpreamble has no effect with --type list");
+ return EINVALID_CMD_LINE;
+ }
/* list type does not require status check */
} else if (!strcmp(type, "full")) {
tree_spec.type = CFG_DEF_TREE_FULL;
@@ -293,14 +301,22 @@ int dumpconfig(struct cmd_context *cmd, int argc, char **argv)
if (arg_is_set(cmd, withsummary_ARG) || arg_is_set(cmd, list_ARG))
tree_spec.withsummary = 1;
+
if (arg_is_set(cmd, withcomments_ARG))
tree_spec.withcomments = 1;
+
if (arg_is_set(cmd, unconfigured_ARG))
tree_spec.unconfigured = 1;
if (arg_is_set(cmd, withversions_ARG))
tree_spec.withversions = 1;
+ if (arg_is_set(cmd, withgeneralpreamble_ARG))
+ tree_spec.withgeneralpreamble = 1;
+
+ if (arg_is_set(cmd, withlocalpreamble_ARG))
+ tree_spec.withlocalpreamble = 1;
+
if (arg_is_set(cmd, withspaces_ARG))
tree_spec.withspaces = 1;
6 years, 4 months
master - lvmconfig: Add options to produce file premable.
by Alasdair Kergon
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d530cb29d10342226d7...
Commit: d530cb29d10342226d77fd95c4f2fbc95174a2be
Parent: 827be01758ec5adb7b9d5ea75b658092adc65534
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Sat Aug 5 16:18:36 2017 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Sat Aug 5 16:21:24 2017 +0100
lvmconfig: Add options to produce file premable.
Use --withgeneralpreamble and --withlocalpreamble instead of
concatenating files.
---
WHATS_NEW | 3 +-
conf/Makefile.in | 4 +-
conf/example.conf.base | 23 ---------------------
conf/lvmlocal.conf.base | 19 ------------------
lib/config/config.c | 6 +++++
lib/config/config.h | 3 ++
lib/config/config_settings.h | 44 ++++++++++++++++++++++++++++++++++++++++++
man/lvmconfig.8_pregen | 20 +++++++++++++++++++
tools/args.h | 6 +++++
tools/command-lines.in | 2 +-
tools/dumpconfig.c | 16 +++++++++++++++
11 files changed, 100 insertions(+), 46 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 46a944b..ebbc7d1 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,6 +1,7 @@
Version 2.02.174 -
=================================
- Imporove makefiles' linking.
+ Add --withgeneralpreamble and --withlocalpreamble to lvmconfig.
+ Improve makefiles' linking.
Fix some paths in generated makefiles to respected configured settings.
Add warning when creating thin-pool with zeroing and chunk size >= 512KiB.
Introduce exit code 4 EINIT_FAILED to replace -1 when initialisation fails.
diff --git a/conf/Makefile.in b/conf/Makefile.in
index c8fee3e..5330c07 100644
--- a/conf/Makefile.in
+++ b/conf/Makefile.in
@@ -32,8 +32,8 @@ include $(top_builddir)/make.tmpl
.PHONY: install_conf install_localconf install_profiles
generate:
- (cat $(top_srcdir)/conf/example.conf.base && LD_LIBRARY_PATH=$(top_builddir)/libdm:$(LD_LIBRARY_PATH) $(top_builddir)/tools/lvm dumpconfig --type default --unconfigured --withcomments --ignorelocal --withspaces) > example.conf.in
- (cat $(top_srcdir)/conf/lvmlocal.conf.base && LD_LIBRARY_PATH=$(top_builddir)/libdm:$(LD_LIBRARY_PATH) $(top_builddir)/tools/lvm dumpconfig --type default --unconfigured --withcomments --withspaces local) > lvmlocal.conf.in
+ LD_LIBRARY_PATH=$(top_builddir)/libdm:$(LD_LIBRARY_PATH) $(top_builddir)/tools/lvm dumpconfig --type default --unconfigured --withgeneralpreamble --withcomments --ignorelocal --withspaces > example.conf.in
+ LD_LIBRARY_PATH=$(top_builddir)/libdm:$(LD_LIBRARY_PATH) $(top_builddir)/tools/lvm dumpconfig --type default --unconfigured --withlocalpreamble --withcomments --withspaces local > lvmlocal.conf.in
install_conf: $(CONFSRC)
@if [ ! -e $(confdir)/$(CONFDEST) ]; then \
diff --git a/conf/example.conf.base b/conf/example.conf.base
deleted file mode 100644
index 5c49899..0000000
--- a/conf/example.conf.base
+++ /dev/null
@@ -1,23 +0,0 @@
-# This is an example configuration file for the LVM2 system.
-# It contains the default settings that would be used if there was no
-# @DEFAULT_SYS_DIR(a)/lvm.conf file.
-#
-# Refer to 'man lvm.conf' for further information including the file layout.
-#
-# Refer to 'man lvm.conf' for information about how settings configured in
-# this file are combined with built-in values and command line options to
-# arrive at the final values used by LVM.
-#
-# Refer to 'man lvmconfig' for information about displaying the built-in
-# and configured values used by LVM.
-#
-# If a default value is set in this file (not commented out), then a
-# new version of LVM using this file will continue using that value,
-# even if the new version of LVM changes the built-in default value.
-#
-# To put this file in a different directory and override @DEFAULT_SYS_DIR@ set
-# the environment variable LVM_SYSTEM_DIR before running the tools.
-#
-# N.B. Take care that each setting only appears once if uncommenting
-# example settings in this file.
-
diff --git a/conf/lvmlocal.conf.base b/conf/lvmlocal.conf.base
deleted file mode 100644
index e2a9e2f..0000000
--- a/conf/lvmlocal.conf.base
+++ /dev/null
@@ -1,19 +0,0 @@
-# This is a local configuration file template for the LVM2 system
-# which should be installed as @DEFAULT_SYS_DIR(a)/lvmlocal.conf .
-#
-# Refer to 'man lvm.conf' for information about the file layout.
-#
-# To put this file in a different directory and override
-# @DEFAULT_SYS_DIR@ set the environment variable LVM_SYSTEM_DIR before
-# running the tools.
-#
-# The lvmlocal.conf file is normally expected to contain only the
-# "local" section which contains settings that should not be shared or
-# repeated among different hosts. (But if other sections are present,
-# they *will* get processed. Settings in this file override equivalent
-# ones in lvm.conf and are in turn overridden by ones in any enabled
-# lvm_<tag>.conf files.)
-#
-# Please take care that each setting only appears once if uncommenting
-# example settings in this file and never copy this file between hosts.
-
diff --git a/lib/config/config.c b/lib/config/config.c
index 04dded7..1f18969 100644
--- a/lib/config/config.c
+++ b/lib/config/config.c
@@ -1880,6 +1880,12 @@ int config_write(struct dm_config_tree *cft,
}
log_verbose("Dumping configuration to %s", file);
+
+ if (tree_spec->withgeneralpreamble)
+ fprintf(baton.fp, CFG_PREAMBLE_GENERAL);
+ if (tree_spec->withlocalpreamble)
+ fprintf(baton.fp, CFG_PREAMBLE_LOCAL);
+
if (!argc) {
if (!dm_config_write_node_out(cft->root, &_out_spec, &baton)) {
log_error("Failure while writing to %s", file);
diff --git a/lib/config/config.h b/lib/config/config.h
index 8a7d6c3..901994a 100644
--- a/lib/config/config.h
+++ b/lib/config/config.h
@@ -141,6 +141,7 @@ typedef struct cfg_def_item {
uint16_t deprecated_since_version; /* version since this item is deprecated */
const char *deprecation_comment; /* comment about reasons for deprecation and settings that supersede this one */
const char *comment; /* comment */
+ const char *file_premable; /* comment text to use at the start of the file */
} cfg_def_item_t;
/* configuration definition tree types */
@@ -173,6 +174,8 @@ struct config_def_tree_spec {
unsigned withversions:1; /* include versions */
unsigned withspaces:1; /* add more spaces in output for better readability */
unsigned unconfigured:1; /* use unconfigured path strings */
+ unsigned withgeneralpreamble:1; /* include preamble for a general config file */
+ unsigned withlocalpreamble:1; /* include preamble for a local config file */
uint8_t *check_status; /* status of last tree check (currently needed for CFG_DEF_TREE_MISSING only) */
};
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 40b64ab..7d800b3 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -121,6 +121,30 @@
cfg_section(root_CFG_SECTION, "(root)", root_CFG_SECTION, 0, vsn(0, 0, 0), 0, NULL, NULL)
+#define CFG_PREAMBLE_GENERAL \
+ "# This is an example configuration file for the LVM2 system.\n" \
+ "# It contains the default settings that would be used if there was no\n" \
+ "# @DEFAULT_SYS_DIR(a)/lvm.conf file.\n" \
+ "#\n" \
+ "# Refer to 'man lvm.conf' for further information including the file layout.\n" \
+ "#\n" \
+ "# Refer to 'man lvm.conf' for information about how settings configured in\n" \
+ "# this file are combined with built-in values and command line options to\n" \
+ "# arrive at the final values used by LVM.\n" \
+ "#\n" \
+ "# Refer to 'man lvmconfig' for information about displaying the built-in\n" \
+ "# and configured values used by LVM.\n" \
+ "#\n" \
+ "# If a default value is set in this file (not commented out), then a\n" \
+ "# new version of LVM using this file will continue using that value,\n" \
+ "# even if the new version of LVM changes the built-in default value.\n" \
+ "#\n" \
+ "# To put this file in a different directory and override @DEFAULT_SYS_DIR@ set\n" \
+ "# the environment variable LVM_SYSTEM_DIR before running the tools.\n" \
+ "#\n" \
+ "# N.B. Take care that each setting only appears once if uncommenting\n" \
+ "# example settings in this file.\n\n"
+
cfg_section(config_CFG_SECTION, "config", root_CFG_SECTION, 0, vsn(2, 2, 99), 0, NULL,
"How LVM configuration settings are handled.\n")
@@ -161,6 +185,26 @@ cfg_section(tags_CFG_SECTION, "tags", root_CFG_SECTION, CFG_DEFAULT_COMMENTED, v
cfg_section(local_CFG_SECTION, "local", root_CFG_SECTION, 0, vsn(2, 2, 117), 0, NULL,
"LVM settings that are specific to the local host.\n")
+#define CFG_PREAMBLE_LOCAL \
+ "# This is a local configuration file template for the LVM2 system\n" \
+ "# which should be installed as @DEFAULT_SYS_DIR(a)/lvmlocal.conf .\n" \
+ "#\n" \
+ "# Refer to 'man lvm.conf' for information about the file layout.\n" \
+ "#\n" \
+ "# To put this file in a different directory and override\n" \
+ "# @DEFAULT_SYS_DIR@ set the environment variable LVM_SYSTEM_DIR before\n" \
+ "# running the tools.\n" \
+ "#\n" \
+ "# The lvmlocal.conf file is normally expected to contain only the\n" \
+ "# \"local\" section which contains settings that should not be shared or\n" \
+ "# repeated among different hosts. (But if other sections are present,\n" \
+ "# they *will* get processed. Settings in this file override equivalent\n" \
+ "# ones in lvm.conf and are in turn overridden by ones in any enabled\n" \
+ "# lvm_<tag>.conf files.)\n" \
+ "#\n" \
+ "# Please take care that each setting only appears once if uncommenting\n" \
+ "# example settings in this file and never copy this file between hosts.\n\n"
+
cfg(config_checks_CFG, "checks", config_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 2, 99), NULL, 0, NULL,
"If enabled, any LVM configuration mismatch is reported.\n"
"This implies checking that the configuration key is understood by\n"
diff --git a/man/lvmconfig.8_pregen b/man/lvmconfig.8_pregen
index 3c3e25f..c60f899 100644
--- a/man/lvmconfig.8_pregen
+++ b/man/lvmconfig.8_pregen
@@ -79,6 +79,14 @@ line settings from --config.
.ad b
.br
.ad l
+[ \fB--withgeneralpreamble\fP ]
+.ad b
+.br
+.ad l
+[ \fB--withlocalpreamble\fP ]
+.ad b
+.br
+.ad l
[ \fB--withspaces\fP ]
.ad b
.br
@@ -389,6 +397,18 @@ settings, also display comments about deprecation.
.ad b
.HP
.ad l
+\fB--withgeneralpreamble\fP
+.br
+Display general file preamble at start of output.
+.ad b
+.HP
+.ad l
+\fB--withlocalpreamble\fP
+.br
+Display local file preamble at start of output.
+.ad b
+.HP
+.ad l
\fB--withspaces\fP
.br
Where appropriate, add more spaces in output for better readability.
diff --git a/tools/args.h b/tools/args.h
index f5e864f..89d84b4 100644
--- a/tools/args.h
+++ b/tools/args.h
@@ -783,6 +783,12 @@ arg(withcomments_ARG, '\0', "withcomments", 0, 0, 0,
"Display a full comment for each configuration node. For deprecated\n"
"settings, also display comments about deprecation.\n")
+arg(withgeneralpreamble_ARG, '\0', "withgeneralpreamble", 0, 0, 0,
+ "Include general config file preamble.\n")
+
+arg(withlocalpreamble_ARG, '\0', "withlocalpreamble", 0, 0, 0,
+ "Include local config file preamble.\n")
+
arg(withspaces_ARG, '\0', "withspaces", 0, 0, 0,
"Where appropriate, add more spaces in output for better readability.\n")
diff --git a/tools/command-lines.in b/tools/command-lines.in
index 6e9192e..1ef234e 100644
--- a/tools/command-lines.in
+++ b/tools/command-lines.in
@@ -206,7 +206,7 @@ OO_REPORT: --aligned, --all, --binary, --configreport ConfigReport, --foreign,
OO_CONFIG: --atversion String, --typeconfig ConfigType, --file String, --ignoreadvanced,
--ignoreunsupported, --ignorelocal, --list, --mergedconfig, --metadataprofile String,
--sinceversion String, --showdeprecated, --showunsupported, --validate, --withsummary,
---withcomments, --withspaces, --unconfigured, --withversions
+--withcomments, --withgeneralpreamble, --withlocalpreamble, --withspaces, --unconfigured, --withversions
---
diff --git a/tools/dumpconfig.c b/tools/dumpconfig.c
index e387e60..9e4408e 100644
--- a/tools/dumpconfig.c
+++ b/tools/dumpconfig.c
@@ -234,6 +234,14 @@ int dumpconfig(struct cmd_context *cmd, int argc, char **argv)
log_error("--withcomments has no effect with --type list");
return EINVALID_CMD_LINE;
}
+ if (arg_is_set(cmd, withlocalpreamble_ARG)) {
+ log_error("--withlocalpreamble has no effect with --type list");
+ return EINVALID_CMD_LINE;
+ }
+ if (arg_is_set(cmd, withgeneralpreamble_ARG)) {
+ log_error("--withgeneralpreamble has no effect with --type list");
+ return EINVALID_CMD_LINE;
+ }
/* list type does not require status check */
} else if (!strcmp(type, "full")) {
tree_spec.type = CFG_DEF_TREE_FULL;
@@ -293,14 +301,22 @@ int dumpconfig(struct cmd_context *cmd, int argc, char **argv)
if (arg_is_set(cmd, withsummary_ARG) || arg_is_set(cmd, list_ARG))
tree_spec.withsummary = 1;
+
if (arg_is_set(cmd, withcomments_ARG))
tree_spec.withcomments = 1;
+
if (arg_is_set(cmd, unconfigured_ARG))
tree_spec.unconfigured = 1;
if (arg_is_set(cmd, withversions_ARG))
tree_spec.withversions = 1;
+ if (arg_is_set(cmd, withgeneralpreamble_ARG))
+ tree_spec.withgeneralpreamble = 1;
+
+ if (arg_is_set(cmd, withlocalpreamble_ARG))
+ tree_spec.withlocalpreamble = 1;
+
if (arg_is_set(cmd, withspaces_ARG))
tree_spec.withspaces = 1;
6 years, 4 months
master - lvmonfig: Add options to produce file premable.
by Alasdair Kergon
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=5c453aef0a84b9a9652...
Commit: 5c453aef0a84b9a965219bd14402be93836fbca1
Parent: 827be01758ec5adb7b9d5ea75b658092adc65534
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Sat Aug 5 16:18:36 2017 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Sat Aug 5 16:20:08 2017 +0100
lvmonfig: Add options to produce file premable.
Use --withgeneralpreamble and --withlocalpreamble instead of
concatenating files.
---
WHATS_NEW | 3 +-
conf/Makefile.in | 4 +-
conf/example.conf.base | 23 ---------------------
conf/lvmlocal.conf.base | 19 ------------------
lib/config/config.c | 6 +++++
lib/config/config.h | 3 ++
lib/config/config_settings.h | 44 ++++++++++++++++++++++++++++++++++++++++++
man/lvmconfig.8_pregen | 20 +++++++++++++++++++
tools/args.h | 6 +++++
tools/command-lines.in | 2 +-
tools/dumpconfig.c | 16 +++++++++++++++
11 files changed, 100 insertions(+), 46 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 46a944b..ebbc7d1 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,6 +1,7 @@
Version 2.02.174 -
=================================
- Imporove makefiles' linking.
+ Add --withgeneralpreamble and --withlocalpreamble to lvmconfig.
+ Improve makefiles' linking.
Fix some paths in generated makefiles to respected configured settings.
Add warning when creating thin-pool with zeroing and chunk size >= 512KiB.
Introduce exit code 4 EINIT_FAILED to replace -1 when initialisation fails.
diff --git a/conf/Makefile.in b/conf/Makefile.in
index c8fee3e..5330c07 100644
--- a/conf/Makefile.in
+++ b/conf/Makefile.in
@@ -32,8 +32,8 @@ include $(top_builddir)/make.tmpl
.PHONY: install_conf install_localconf install_profiles
generate:
- (cat $(top_srcdir)/conf/example.conf.base && LD_LIBRARY_PATH=$(top_builddir)/libdm:$(LD_LIBRARY_PATH) $(top_builddir)/tools/lvm dumpconfig --type default --unconfigured --withcomments --ignorelocal --withspaces) > example.conf.in
- (cat $(top_srcdir)/conf/lvmlocal.conf.base && LD_LIBRARY_PATH=$(top_builddir)/libdm:$(LD_LIBRARY_PATH) $(top_builddir)/tools/lvm dumpconfig --type default --unconfigured --withcomments --withspaces local) > lvmlocal.conf.in
+ LD_LIBRARY_PATH=$(top_builddir)/libdm:$(LD_LIBRARY_PATH) $(top_builddir)/tools/lvm dumpconfig --type default --unconfigured --withgeneralpreamble --withcomments --ignorelocal --withspaces > example.conf.in
+ LD_LIBRARY_PATH=$(top_builddir)/libdm:$(LD_LIBRARY_PATH) $(top_builddir)/tools/lvm dumpconfig --type default --unconfigured --withlocalpreamble --withcomments --withspaces local > lvmlocal.conf.in
install_conf: $(CONFSRC)
@if [ ! -e $(confdir)/$(CONFDEST) ]; then \
diff --git a/conf/example.conf.base b/conf/example.conf.base
deleted file mode 100644
index 5c49899..0000000
--- a/conf/example.conf.base
+++ /dev/null
@@ -1,23 +0,0 @@
-# This is an example configuration file for the LVM2 system.
-# It contains the default settings that would be used if there was no
-# @DEFAULT_SYS_DIR(a)/lvm.conf file.
-#
-# Refer to 'man lvm.conf' for further information including the file layout.
-#
-# Refer to 'man lvm.conf' for information about how settings configured in
-# this file are combined with built-in values and command line options to
-# arrive at the final values used by LVM.
-#
-# Refer to 'man lvmconfig' for information about displaying the built-in
-# and configured values used by LVM.
-#
-# If a default value is set in this file (not commented out), then a
-# new version of LVM using this file will continue using that value,
-# even if the new version of LVM changes the built-in default value.
-#
-# To put this file in a different directory and override @DEFAULT_SYS_DIR@ set
-# the environment variable LVM_SYSTEM_DIR before running the tools.
-#
-# N.B. Take care that each setting only appears once if uncommenting
-# example settings in this file.
-
diff --git a/conf/lvmlocal.conf.base b/conf/lvmlocal.conf.base
deleted file mode 100644
index e2a9e2f..0000000
--- a/conf/lvmlocal.conf.base
+++ /dev/null
@@ -1,19 +0,0 @@
-# This is a local configuration file template for the LVM2 system
-# which should be installed as @DEFAULT_SYS_DIR(a)/lvmlocal.conf .
-#
-# Refer to 'man lvm.conf' for information about the file layout.
-#
-# To put this file in a different directory and override
-# @DEFAULT_SYS_DIR@ set the environment variable LVM_SYSTEM_DIR before
-# running the tools.
-#
-# The lvmlocal.conf file is normally expected to contain only the
-# "local" section which contains settings that should not be shared or
-# repeated among different hosts. (But if other sections are present,
-# they *will* get processed. Settings in this file override equivalent
-# ones in lvm.conf and are in turn overridden by ones in any enabled
-# lvm_<tag>.conf files.)
-#
-# Please take care that each setting only appears once if uncommenting
-# example settings in this file and never copy this file between hosts.
-
diff --git a/lib/config/config.c b/lib/config/config.c
index 04dded7..1f18969 100644
--- a/lib/config/config.c
+++ b/lib/config/config.c
@@ -1880,6 +1880,12 @@ int config_write(struct dm_config_tree *cft,
}
log_verbose("Dumping configuration to %s", file);
+
+ if (tree_spec->withgeneralpreamble)
+ fprintf(baton.fp, CFG_PREAMBLE_GENERAL);
+ if (tree_spec->withlocalpreamble)
+ fprintf(baton.fp, CFG_PREAMBLE_LOCAL);
+
if (!argc) {
if (!dm_config_write_node_out(cft->root, &_out_spec, &baton)) {
log_error("Failure while writing to %s", file);
diff --git a/lib/config/config.h b/lib/config/config.h
index 8a7d6c3..901994a 100644
--- a/lib/config/config.h
+++ b/lib/config/config.h
@@ -141,6 +141,7 @@ typedef struct cfg_def_item {
uint16_t deprecated_since_version; /* version since this item is deprecated */
const char *deprecation_comment; /* comment about reasons for deprecation and settings that supersede this one */
const char *comment; /* comment */
+ const char *file_premable; /* comment text to use at the start of the file */
} cfg_def_item_t;
/* configuration definition tree types */
@@ -173,6 +174,8 @@ struct config_def_tree_spec {
unsigned withversions:1; /* include versions */
unsigned withspaces:1; /* add more spaces in output for better readability */
unsigned unconfigured:1; /* use unconfigured path strings */
+ unsigned withgeneralpreamble:1; /* include preamble for a general config file */
+ unsigned withlocalpreamble:1; /* include preamble for a local config file */
uint8_t *check_status; /* status of last tree check (currently needed for CFG_DEF_TREE_MISSING only) */
};
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 40b64ab..7d800b3 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -121,6 +121,30 @@
cfg_section(root_CFG_SECTION, "(root)", root_CFG_SECTION, 0, vsn(0, 0, 0), 0, NULL, NULL)
+#define CFG_PREAMBLE_GENERAL \
+ "# This is an example configuration file for the LVM2 system.\n" \
+ "# It contains the default settings that would be used if there was no\n" \
+ "# @DEFAULT_SYS_DIR(a)/lvm.conf file.\n" \
+ "#\n" \
+ "# Refer to 'man lvm.conf' for further information including the file layout.\n" \
+ "#\n" \
+ "# Refer to 'man lvm.conf' for information about how settings configured in\n" \
+ "# this file are combined with built-in values and command line options to\n" \
+ "# arrive at the final values used by LVM.\n" \
+ "#\n" \
+ "# Refer to 'man lvmconfig' for information about displaying the built-in\n" \
+ "# and configured values used by LVM.\n" \
+ "#\n" \
+ "# If a default value is set in this file (not commented out), then a\n" \
+ "# new version of LVM using this file will continue using that value,\n" \
+ "# even if the new version of LVM changes the built-in default value.\n" \
+ "#\n" \
+ "# To put this file in a different directory and override @DEFAULT_SYS_DIR@ set\n" \
+ "# the environment variable LVM_SYSTEM_DIR before running the tools.\n" \
+ "#\n" \
+ "# N.B. Take care that each setting only appears once if uncommenting\n" \
+ "# example settings in this file.\n\n"
+
cfg_section(config_CFG_SECTION, "config", root_CFG_SECTION, 0, vsn(2, 2, 99), 0, NULL,
"How LVM configuration settings are handled.\n")
@@ -161,6 +185,26 @@ cfg_section(tags_CFG_SECTION, "tags", root_CFG_SECTION, CFG_DEFAULT_COMMENTED, v
cfg_section(local_CFG_SECTION, "local", root_CFG_SECTION, 0, vsn(2, 2, 117), 0, NULL,
"LVM settings that are specific to the local host.\n")
+#define CFG_PREAMBLE_LOCAL \
+ "# This is a local configuration file template for the LVM2 system\n" \
+ "# which should be installed as @DEFAULT_SYS_DIR(a)/lvmlocal.conf .\n" \
+ "#\n" \
+ "# Refer to 'man lvm.conf' for information about the file layout.\n" \
+ "#\n" \
+ "# To put this file in a different directory and override\n" \
+ "# @DEFAULT_SYS_DIR@ set the environment variable LVM_SYSTEM_DIR before\n" \
+ "# running the tools.\n" \
+ "#\n" \
+ "# The lvmlocal.conf file is normally expected to contain only the\n" \
+ "# \"local\" section which contains settings that should not be shared or\n" \
+ "# repeated among different hosts. (But if other sections are present,\n" \
+ "# they *will* get processed. Settings in this file override equivalent\n" \
+ "# ones in lvm.conf and are in turn overridden by ones in any enabled\n" \
+ "# lvm_<tag>.conf files.)\n" \
+ "#\n" \
+ "# Please take care that each setting only appears once if uncommenting\n" \
+ "# example settings in this file and never copy this file between hosts.\n\n"
+
cfg(config_checks_CFG, "checks", config_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 2, 99), NULL, 0, NULL,
"If enabled, any LVM configuration mismatch is reported.\n"
"This implies checking that the configuration key is understood by\n"
diff --git a/man/lvmconfig.8_pregen b/man/lvmconfig.8_pregen
index 3c3e25f..c60f899 100644
--- a/man/lvmconfig.8_pregen
+++ b/man/lvmconfig.8_pregen
@@ -79,6 +79,14 @@ line settings from --config.
.ad b
.br
.ad l
+[ \fB--withgeneralpreamble\fP ]
+.ad b
+.br
+.ad l
+[ \fB--withlocalpreamble\fP ]
+.ad b
+.br
+.ad l
[ \fB--withspaces\fP ]
.ad b
.br
@@ -389,6 +397,18 @@ settings, also display comments about deprecation.
.ad b
.HP
.ad l
+\fB--withgeneralpreamble\fP
+.br
+Display general file preamble at start of output.
+.ad b
+.HP
+.ad l
+\fB--withlocalpreamble\fP
+.br
+Display local file preamble at start of output.
+.ad b
+.HP
+.ad l
\fB--withspaces\fP
.br
Where appropriate, add more spaces in output for better readability.
diff --git a/tools/args.h b/tools/args.h
index f5e864f..89d84b4 100644
--- a/tools/args.h
+++ b/tools/args.h
@@ -783,6 +783,12 @@ arg(withcomments_ARG, '\0', "withcomments", 0, 0, 0,
"Display a full comment for each configuration node. For deprecated\n"
"settings, also display comments about deprecation.\n")
+arg(withgeneralpreamble_ARG, '\0', "withgeneralpreamble", 0, 0, 0,
+ "Include general config file preamble.\n")
+
+arg(withlocalpreamble_ARG, '\0', "withlocalpreamble", 0, 0, 0,
+ "Include local config file preamble.\n")
+
arg(withspaces_ARG, '\0', "withspaces", 0, 0, 0,
"Where appropriate, add more spaces in output for better readability.\n")
diff --git a/tools/command-lines.in b/tools/command-lines.in
index 6e9192e..1ef234e 100644
--- a/tools/command-lines.in
+++ b/tools/command-lines.in
@@ -206,7 +206,7 @@ OO_REPORT: --aligned, --all, --binary, --configreport ConfigReport, --foreign,
OO_CONFIG: --atversion String, --typeconfig ConfigType, --file String, --ignoreadvanced,
--ignoreunsupported, --ignorelocal, --list, --mergedconfig, --metadataprofile String,
--sinceversion String, --showdeprecated, --showunsupported, --validate, --withsummary,
---withcomments, --withspaces, --unconfigured, --withversions
+--withcomments, --withgeneralpreamble, --withlocalpreamble, --withspaces, --unconfigured, --withversions
---
diff --git a/tools/dumpconfig.c b/tools/dumpconfig.c
index e387e60..9e4408e 100644
--- a/tools/dumpconfig.c
+++ b/tools/dumpconfig.c
@@ -234,6 +234,14 @@ int dumpconfig(struct cmd_context *cmd, int argc, char **argv)
log_error("--withcomments has no effect with --type list");
return EINVALID_CMD_LINE;
}
+ if (arg_is_set(cmd, withlocalpreamble_ARG)) {
+ log_error("--withlocalpreamble has no effect with --type list");
+ return EINVALID_CMD_LINE;
+ }
+ if (arg_is_set(cmd, withgeneralpreamble_ARG)) {
+ log_error("--withgeneralpreamble has no effect with --type list");
+ return EINVALID_CMD_LINE;
+ }
/* list type does not require status check */
} else if (!strcmp(type, "full")) {
tree_spec.type = CFG_DEF_TREE_FULL;
@@ -293,14 +301,22 @@ int dumpconfig(struct cmd_context *cmd, int argc, char **argv)
if (arg_is_set(cmd, withsummary_ARG) || arg_is_set(cmd, list_ARG))
tree_spec.withsummary = 1;
+
if (arg_is_set(cmd, withcomments_ARG))
tree_spec.withcomments = 1;
+
if (arg_is_set(cmd, unconfigured_ARG))
tree_spec.unconfigured = 1;
if (arg_is_set(cmd, withversions_ARG))
tree_spec.withversions = 1;
+ if (arg_is_set(cmd, withgeneralpreamble_ARG))
+ tree_spec.withgeneralpreamble = 1;
+
+ if (arg_is_set(cmd, withlocalpreamble_ARG))
+ tree_spec.withlocalpreamble = 1;
+
if (arg_is_set(cmd, withspaces_ARG))
tree_spec.withspaces = 1;
6 years, 4 months
master - dmsetup: Add --concise to dmsetup create.
by Alasdair Kergon
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=827be01758ec5adb7b9...
Commit: 827be01758ec5adb7b9d5ea75b658092adc65534
Parent: e6afe9e7820da5d5086dbcf82532bb9d0daafb00
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Fri Aug 4 19:38:34 2017 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Fri Aug 4 19:38:34 2017 +0100
dmsetup: Add --concise to dmsetup create.
Add the new concise format to dmsetup create, either as a single
command-line parameter or from stdin.
Based on patches submitted by
Enric Balletbo i Serra <enric.balletbo(a)collabora.com>.
---
WHATS_NEW_DM | 1 +
man/dmsetup.8_main | 72 +++++++++++++++-
tools/dmsetup.c | 253 ++++++++++++++++++++++++++++++++++++++++++++++++++--
3 files changed, 316 insertions(+), 10 deletions(-)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 514973b..d3cc78c 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
Version 1.02.143 -
=================================
+ Add --concise to dmsetup create for many devices with tables in one command.
Accept minor number without major in library when it knows dm major number.
Introduce single-line concise table output format: dmsetup table --concise
diff --git a/man/dmsetup.8_main b/man/dmsetup.8_main
index c218f6c..1e778ad 100644
--- a/man/dmsetup.8_main
+++ b/man/dmsetup.8_main
@@ -36,6 +36,17 @@ dmsetup \(em low level logical volume management
.
.HP
.B dmsetup
+.de CMD_CREATE_CONCISE
+. ad l
+. BR create
+. BR --concise
+. RI [ concise_device_specification ]
+. ad b
+..
+.CMD_CREATE_CONCISE
+.
+.HP
+.B dmsetup
.de CMD_DEPS
. ad l
. BR deps
@@ -621,6 +632,16 @@ device the node \fI/dev/mapper/device_name\fP is created.
See below for more information on the table format.
.
.HP
+.CMD_CREATE_CONCISE
+.br
+Creates one or more devices from a concise device specification.
+Each device is specified by a comma-separated list: name, uuid, minor number, flags, comma-separated table lines.
+Flags defaults to read-write (rw) or may be read-only (ro).
+Uuid, minor number and flags are optional so those fields may be empty.
+A semi-colon separates specifications of different devices.
+Use a backslash to escape the following character, for example a comma or semi-colon in a name or table. See also CONCISE FORMAT below.
+.
+.HP
.CMD_DEPS
.br
Outputs a list of devices referenced by the live table for the specified
@@ -828,7 +849,7 @@ displayed always.
With \fB--concise\fP, the output is presented concisely on a single line.
Commas then separate the name, uuid, minor device number, flags ('ro' or 'rw')
and the table (if present). Semi-colons separate devices. Backslashes escape
-any commas, semi-colons or backslashes.
+any commas, semi-colons or backslashes. See CONCISE FORMAT below.
.
.HP
.CMD_TARGETS
@@ -1001,6 +1022,55 @@ documentation directory for the device-mapper package.)
.br
2056320 2875602 linear /dev/hdb 1028160
.
+.SH CONCISE FORMAT
+.
+A concise representation of one of more devices.
+.sp
+.br
+- A comma separates the fields of each device.
+.br
+- A semi-colon separates devices.
+.TP
+The representation of a device takes the form:
+.sp
+<name>,<uuid>,<minor>,<flags>,<table>[,<table>+][;<dev_name>,<uuid>,<minor>,<flags>,<table>[,<table>+]]
+.TP
+The fields are:
+.
+.TP
+.B name
+The name of the device.
+.TP
+.B uuid
+The UUID of the device (or empty).
+.TP
+.B minor
+The minor number of the device. If empty, the kernel assigns a suitable minor number.
+.TP
+.B flags
+Supported flags are:
+.sp
+.B ro
+Sets the table being loaded for the device read-only
+.br
+.B rw
+Sets the table being loaded for the device read-write (default)
+.TP
+.B table
+One line of the table. See TABLE FORMAT above.
+.
+.SH EXAMPLES
+.
+# A simple linear read-only device
+.br
+test-linear-small,,,ro,0 2097152 linear /dev/loop0 0, 2097152 2097152 linear /dev/loop1 0
+.br
+.sp
+# Two linear devices
+.br
+test-linear-small,,,,0 2097152 linear /dev/loop0 0;test-linear-large,,,, 0 2097152 linear /dev/loop1 0, 2097152 2097152 linear /dev/loop2 0
+.br
+.
.SH ENVIRONMENT VARIABLES
.
.TP
diff --git a/tools/dmsetup.c b/tools/dmsetup.c
index e92ba17..0fd2f2c 100644
--- a/tools/dmsetup.c
+++ b/tools/dmsetup.c
@@ -359,6 +359,23 @@ static int _parse_line(struct dm_task *dmt, char *buffer, const char *file,
return 1;
}
+/* Parse multiple lines of table */
+static int _parse_table_lines(struct dm_task *dmt)
+{
+ char *pos = _table, *next_pos;
+ int line = 0;
+
+ do {
+ /* Identify and terminate each line */
+ if ((next_pos = strchr(_table, '\n')))
+ *next_pos++ = '\0';
+ if (!_parse_line(dmt, pos, "", ++line))
+ return_0;
+ } while ((pos = next_pos));
+
+ return 1;
+}
+
static int _parse_file(struct dm_task *dmt, const char *file)
{
char *buffer = NULL;
@@ -366,9 +383,9 @@ static int _parse_file(struct dm_task *dmt, const char *file)
FILE *fp;
int r = 0, line = 0;
- /* one-line table on cmdline */
+ /* Table on cmdline or from stdin with --concise */
if (_table)
- return _parse_line(dmt, _table, "", ++line);
+ return _parse_table_lines(dmt);
/* OK for empty stdin */
if (file) {
@@ -1098,21 +1115,17 @@ out:
return r;
}
-static int _create(CMD_ARGS)
+static int _create_one_device(const char *name, const char *file)
{
int r = 0;
struct dm_task *dmt;
- const char *file = NULL;
uint32_t cookie = 0;
uint16_t udev_flags = 0;
- if (argc == 2)
- file = argv[1];
-
if (!(dmt = dm_task_create(DM_DEVICE_CREATE)))
return_0;
- if (!dm_task_set_name(dmt, argv[0]))
+ if (!dm_task_set_name(dmt, name))
goto_out;
if (_switches[UUID_ARG] && !dm_task_set_uuid(dmt, _uuid))
@@ -1187,6 +1200,221 @@ out:
return r;
}
+#define DEFAULT_BUF_SIZE 4096
+
+static char *_slurp_stdin(void)
+{
+ char *buf, *pos;
+ size_t bufsize = DEFAULT_BUF_SIZE;
+ size_t total = 0;
+ ssize_t n = 0;
+
+ if (!(buf = dm_malloc(bufsize))) {
+ log_error("Buffer memory allocation failed.");
+ return NULL;
+ }
+
+ pos = buf;
+ do {
+ do
+ n = read(STDIN_FILENO, pos, (size_t) bufsize - total - 1);
+ while ((n < 0) && ((errno == EINTR) || (errno == EAGAIN)));
+
+ if (n < 0) {
+ log_error("Read from stdin aborted: %s", strerror(errno));
+ dm_free(buf);
+ return NULL;
+ }
+
+ if (!n)
+ break;
+
+ total += n;
+ pos += n;
+ if (total == bufsize - 1) {
+ bufsize *= 2;
+ if (!(buf = dm_realloc(buf, bufsize))) {
+ log_error("Buffer memory extension to %" PRIsize_t " bytes failed.", bufsize);
+ return NULL;
+ }
+ }
+ } while (1);
+
+ buf[total] = '\0';
+
+ return buf;
+}
+
+static int _create_concise(const struct command *cmd, int argc, char **argv)
+{
+ char *concise_format;
+ char *c, *n;
+ char *fields[5] = { NULL }; /* name,uuid,minor,flags,table */
+ int f = 0;
+
+ if (_switches[TABLE_ARG] || _switches[MINOR_ARG] || _switches[UUID_ARG] ||
+ _switches[NOTABLE_ARG] || _switches[INACTIVE_ARG]){
+ log_error("--concise is incompatible with --[no]table, --minor, --uuid and --inactive.");
+ return 0;
+ }
+
+ if (argc)
+ concise_format = argv[0];
+ else if (!(concise_format = _slurp_stdin()))
+ return_0;
+
+ /* Work through input string c, parsing into sets of 5 fields. */
+ /* Strip out any characters quoted by backslashes in-place. */
+ /* Read characters from c and prepare them in situ for final processing at n */
+ c = n = fields[f] = concise_format;
+
+ while (*c) {
+ /* Quoted character? Skip past quote. */
+ if (*c == '\\') {
+ if (!*(++c)) {
+ log_error("Backslash must be followed by another character at end of string.");
+ *n = '\0';
+ log_error("Parsed %d fields: name: %s uuid: %s minor: %s flags: %s table: %s",
+ f + 1, fields[0], fields[1], fields[2], fields[3], fields[4]);
+ goto out;
+ }
+
+ /* Don't interpret next character */
+ *n++ = *c++;
+
+ continue;
+ }
+
+ /* Comma marking end of field? */
+ if (*c == ',' && f < 4) {
+ /* Terminate string */
+ *n++ = '\0', c++;
+
+ /* Store start of next field */
+ fields[++f] = n;
+
+ /* Skip any whitespace after field-separating commas */
+ while(isspace(*c))
+ c++;
+
+ continue;
+ }
+
+ /* Comma marking end of a table line? */
+ if (*c == ',' && f >= 4) {
+ /* Replace comma with newline to match standard table input format */
+ *n++ = '\n', c++;
+
+ continue;
+ }
+
+ /* Semi-colon marking end of device? */
+ if (*c == ';' || *(c + 1) == '\0') {
+ /* End of input? */
+ if (*c != ';')
+ /* Copy final character */
+ *n++ = *c;
+
+ /* Terminate string */
+ *n++ = '\0', c++;
+
+ if (f != 4) {
+ log_error("Five comma-separated fields are required for each device");
+ log_error("Parsed %d fields: name: %s uuid: %s minor: %s flags: %s table: %s",
+ f + 1, fields[0], fields[1], fields[2], fields[3], fields[4]);
+ goto out;
+ }
+
+ /* Set up parameters the same way as when specified directly on command line */
+ if (*fields[1]) {
+ _switches[UUID_ARG] = 1;
+ _uuid = fields[1];
+ }
+
+ if (*fields[2]) {
+ _switches[MINOR_ARG] = 1;
+ _int_args[MINOR_ARG] = atoi(fields[2]);
+ }
+
+ if (!strcmp(fields[3], "ro"))
+ _switches[READ_ONLY] = 1;
+ else if (*fields[3] && strcmp(fields[3], "rw")) {
+ log_error("Invalid flags parameter '%s' must be 'ro' or 'rw' or empty.", fields[3]);
+ _uuid = NULL;
+ goto out;
+ }
+
+ _table = fields[4];
+
+ /* Create the device */
+ if (!_create_one_device(fields[0], NULL)) {
+ _uuid = _table = NULL;
+ goto out;
+ }
+
+ /* Clear parameters ready for any further devices */
+ _switches[UUID_ARG] = 0;
+ _switches[MINOR_ARG] = 0;
+ _switches[READ_ONLY] = 0;
+ _uuid = _table = NULL;
+
+ f = 0;
+ fields[0] = n;
+ fields[1] = fields[2] = fields[3] = fields[4] = NULL;
+
+ /* Skip any whitespace after semi-colons */
+ while(isspace(*c))
+ c++;
+
+ continue;
+ }
+
+ /* Normal character */
+ *n++ = *c++;
+ }
+
+ if (fields[0] != n) {
+ *n = '\0';
+ log_error("Incomplete entry: five comma-separated fields are required for each device");
+ log_error("Parsed %d fields: name: %s uuid: %s minor: %s flags: %s table: %s",
+ f + 1, fields[0], fields[1], fields[2], fields[3], fields[4]);
+ goto out;
+ }
+
+ return 1;
+
+out:
+ if (!argc)
+ dm_free(concise_format);
+
+ return 0;
+}
+
+static int _create(CMD_ARGS)
+{
+ const char *name;
+ const char *file = NULL;
+
+ if (_switches[CONCISE_ARG]) {
+ if (argc > 1) {
+ log_error("dmsetup create --concise takes at most one argument");
+ return 0;
+ }
+ return _create_concise(cmd, argc, argv);
+ }
+
+ if (!argc) {
+ log_error("Please provide a name for the new device.");
+ return 0;
+ }
+
+ name = argv[0];
+ if (argc == 2)
+ file = argv[1];
+
+ return _create_one_device(name, file);
+}
+
static int _do_rename(const char *name, const char *new_name, const char *new_uuid) {
int r = 0;
struct dm_task *dmt;
@@ -2148,6 +2376,7 @@ static int _status(CMD_ARGS)
name = names->name;
else {
if (!argc && !_switches[UUID_ARG] && !_switches[MAJOR_ARG])
+ /* FIXME Respect deps in concise mode, so they are correctly ordered for recreation */
return _process_all(cmd, NULL, argc, argv, 0, _status);
name = argv[0];
}
@@ -5930,7 +6159,8 @@ static struct command _dmsetup_commands[] = {
"\t [-U|--uid <uid>] [-G|--gid <gid>] [-M|--mode <octal_mode>]\n"
"\t [-u|uuid <uuid>] [--addnodeonresume|--addnodeoncreate]\n"
"\t [--readahead {[+]<sectors>|auto|none}]\n"
- "\t [-n|--notable|--table {<table>|<table_file>}]", 1, 2, 0, 0, _create},
+ "\t [-n|--notable|--table {<table>|<table_file>}]\n"
+ "\tcreate --concise [<concise_device_spec_list>]", 0, 2, 0, 0, _create},
{"remove", "[--deferred] [-f|--force] [--retry] <device>...", 0, -1, 1, 0, _remove},
{"remove_all", "[-f|--force]", 0, 0, 0, 0, _remove_all},
{"suspend", "[--noflush] [--nolockfs] <device>...", 0, -1, 1, 0, _suspend},
@@ -6022,6 +6252,11 @@ static void _dmsetup_usage(FILE *out)
"-j <major> -m <minor>\n");
fprintf(out, "<mangling_mode> is one of 'none', 'auto' and 'hex'.\n");
fprintf(out, "<fields> are comma-separated. Use 'help -c' for list.\n");
+ fprintf(out, "<concise_device_specification> has single-device entries separated by semi-colons:\n"
+ " <name>,<uuid>,<minor>,<flags>,<table>\n"
+ " where <flags> is 'ro' or 'rw' (the default) and any of <uuid>, <minor>\n"
+ " and <flags> may be empty. Separate extra table lines with commas.\n"
+ " E.g.: dev1,,,,0 100 linear 253:1 0,100 100 error;dev2,,,ro,0 1 error\n");
fprintf(out, "Table_file contents may be supplied on stdin.\n");
fprintf(out, "Options are: devno, devname, blkdevname.\n");
fprintf(out, "Tree specific options are: ascii, utf, vt100; compact, inverted, notrunc;\n"
6 years, 4 months
master - ioctl: Allow minor without major.
by Alasdair Kergon
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e6afe9e7820da5d5086...
Commit: e6afe9e7820da5d5086dbcf82532bb9d0daafb00
Parent: 5dd53943c9bee9d55cde9c8fee27a2e3ea031327
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Fri Aug 4 14:45:20 2017 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Fri Aug 4 14:45:20 2017 +0100
ioctl: Allow minor without major.
There's no need to insist on a major number being supplied when the
code's going to override it if it's wrong anyway.
---
WHATS_NEW_DM | 1 +
libdm/ioctl/libdm-iface.c | 10 +++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index c41bcfd..514973b 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
Version 1.02.143 -
=================================
+ Accept minor number without major in library when it knows dm major number.
Introduce single-line concise table output format: dmsetup table --concise
Version 1.02.142 - 20th July 2017
diff --git a/libdm/ioctl/libdm-iface.c b/libdm/ioctl/libdm-iface.c
index c47e084..e32af80 100644
--- a/libdm/ioctl/libdm-iface.c
+++ b/libdm/ioctl/libdm-iface.c
@@ -1172,11 +1172,6 @@ static struct dm_ioctl *_flatten(struct dm_task *dmt, unsigned repeat_count)
dmi->data_start = sizeof(struct dm_ioctl);
if (dmt->minor >= 0) {
- if (dmt->major <= 0) {
- log_error("Missing major number for persistent device.");
- goto bad;
- }
-
if (!_dm_multiple_major_support && dmt->allow_default_major_fallback &&
dmt->major != (int) _dm_device_major) {
log_verbose("Overriding major number of %d "
@@ -1185,6 +1180,11 @@ static struct dm_ioctl *_flatten(struct dm_task *dmt, unsigned repeat_count)
dmt->major = _dm_device_major;
}
+ if (dmt->major <= 0) {
+ log_error("Missing major number for persistent device.");
+ goto bad;
+ }
+
dmi->flags |= DM_PERSISTENT_DEV_FLAG;
dmi->dev = MKDEV((dev_t)dmt->major, (dev_t)dmt->minor);
}
6 years, 4 months
master - tests: update checked message
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=5dd53943c9bee9d55cd...
Commit: 5dd53943c9bee9d55cde9c8fee27a2e3ea031327
Parent: 19bd65207e2aec48a8d6194aefac9be05a13d944
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Aug 2 00:04:35 2017 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Aug 2 00:04:35 2017 +0200
tests: update checked message
---
test/shell/lvconvert-thin.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/shell/lvconvert-thin.sh b/test/shell/lvconvert-thin.sh
index 587f922..1f8d2ed 100644
--- a/test/shell/lvconvert-thin.sh
+++ b/test/shell/lvconvert-thin.sh
@@ -80,8 +80,8 @@ lvremove -f $vg
lvcreate -L1T -n $lv1 $vg
lvcreate -L32 -n $lv2 $vg
lvconvert --yes -c 8M --type thin-pool $vg/$lv1 2>&1 | tee err
-# Check tther is warning for large chunk size and zeroing enabled
-grep "Pool zeroing and large" err
+# Check there is a warning for large chunk size and zeroing enabled
+grep "WARNING: Pool zeroing and" err
UUID=$(get lv_field $vg/$lv2 uuid)
# Fail is pool is active
# TODO maybe detect inactive pool and deactivate
6 years, 4 months
master - tests: update makefiles
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=19bd65207e2aec48a8d...
Commit: 19bd65207e2aec48a8d6194aefac9be05a13d944
Parent: 3232b210ab750bb21b9032d41cf20aee2bb33288
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Aug 1 18:53:25 2017 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Aug 1 18:53:25 2017 +0200
tests: update makefiles
---
test/Makefile.in | 4 ++--
test/api/Makefile.in | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/test/Makefile.in b/test/Makefile.in
index eee9bf2..c3285e4 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -256,14 +256,14 @@ lib/fail: lib/not
$(LN_S) -f not lib/fail
lib/runner: lib/runner.o .lib-dir-stamp
- $(CXX) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) -o $@ $<
+ $(CXX) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) -o $@ $<
lib/runner.o: $(wildcard $(srcdir)/lib/*.h)
CFLAGS_runner.o += $(EXTRA_EXEC_CFLAGS)
lib/%: lib/%.o .lib-dir-stamp
- $(CC) $(LDFLAGS) -o $@ $<
+ $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) -o $@ $<
lib/%: $(srcdir)/lib/%.sh .lib-dir-stamp
cp $< $@
diff --git a/test/api/Makefile.in b/test/api/Makefile.in
index cc237df..e953675 100644
--- a/test/api/Makefile.in
+++ b/test/api/Makefile.in
@@ -46,10 +46,10 @@ LDFLAGS += -L$(top_builddir)/liblvm -L$(top_builddir)/daemons/dmeventd
LIBS += @LVM2APP_LIB@ $(DMEVENT_LIBS) -ldevmapper
%.t: %.o $(DEPLIBS)
- $(CC) -o $@ $(<) $(LDFLAGS) $(LIBS)
+ $(CC) -o $@ $(<) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) $(LIBS)
test: $(OBJECTS) $(DEPLIBS)
- $(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(LIBS) $(READLINE_LIBS)
+ $(CC) -o $@ $(OBJECTS) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) $(LIBS) $(READLINE_LIBS)
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status test/api/Makefile
6 years, 4 months
master - makefiles: add DEFS_$@ for cxx
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=3232b210ab750bb21b9...
Commit: 3232b210ab750bb21b9032d41cf20aee2bb33288
Parent: ad44543e8166d7068c8db1222aa06c786dcf58b3
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Aug 1 18:13:21 2017 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Aug 1 18:33:50 2017 +0200
makefiles: add DEFS_$@ for cxx
Add DEFS_$@ for c++ (used only by test suite...)
Just to pair plain C build rules.
---
make.tmpl.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/make.tmpl.in b/make.tmpl.in
index 91f38b8..65362d8 100644
--- a/make.tmpl.in
+++ b/make.tmpl.in
@@ -439,7 +439,7 @@ endif
$(CC) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(PROGS_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(WCFLAGS) $(CFLAGS) $(CFLAGS_$@) $< -o $@
%.o: %.cpp
- $(CXX) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(DEFS) $(WFLAGS) $(CXXFLAGS) $(CXXFLAGS_$@) $< -o $@
+ $(CXX) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(CXXFLAGS) $(CXXFLAGS_$@) $< -o $@
%.pot: %.c Makefile
$(CC) -E $(INCLUDES) $(VALGRIND_CFLAGS) $(PROGS_CFLAGS) -include $(top_builddir)/include/pogen.h $(DEFS) $(WFLAGS) $(CFLAGS) $< >$@
6 years, 4 months
master - makefiles: script executable missed dynamic
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=ad44543e8166d7068c8...
Commit: ad44543e8166d7068c8db1222aa06c786dcf58b3
Parent: 9dc1f51d2825c5e48da06e20a9c7a570fbef09a3
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Aug 1 18:19:12 2017 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Aug 1 18:32:16 2017 +0200
makefiles: script executable missed dynamic
Add missing ELDFLAGS when linking binary.
Also pass CFLAGS for cases where we build code coverage compilation.
---
scripts/Makefile.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
index b0d72c6..d06766f 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -89,7 +89,7 @@ endif
CFLAGS_lvm2_activation_generator_systemd_red_hat.o += $(EXTRA_EXEC_CFLAGS)
lvm2_activation_generator_systemd_red_hat: $(OBJECTS) $(DEPLIBS)
- $(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(LVMLIBS)
+ $(CC) -o $@ $(OBJECTS) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) $(LVMLIBS)
install_systemd_generators:
$(INSTALL_DIR) $(systemd_generator_dir)
6 years, 4 months
master - makefiles: fix tested vars
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=9dc1f51d2825c5e48da...
Commit: 9dc1f51d2825c5e48da06e20a9c7a570fbef09a3
Parent: 95dd5bc7fb7dc818116ee367aaa3079f410e2cf7
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Aug 1 18:18:05 2017 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Aug 1 18:18:05 2017 +0200
makefiles: fix tested vars
For resolving usability of DEBUG_MEM - check proper translated make
vars for proper value.
---
make.tmpl.in | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/make.tmpl.in b/make.tmpl.in
index 17276c3..91f38b8 100644
--- a/make.tmpl.in
+++ b/make.tmpl.in
@@ -243,12 +243,12 @@ endif
CFLAGS += -fno-omit-frame-pointer
DEFS += -DDEBUG
# memory debugging is not thread-safe yet
- ifneq ("@DMEVENTD@", "yes")
- ifneq ("@DMFILEMAPD@", "yes")
- ifneq ("@LVMLOCKD@", "yes")
- ifneq ("@LVMPOLLD@", "yes")
- ifneq ("@LVMETAD@", "yes")
- ifneq ("@CLVMD@", "yes")
+ ifneq ("@BUILD_DMEVENTD@", "yes")
+ ifneq ("@BUILD_DMFILEMAPD@", "yes")
+ ifneq ("@BUILD_LVMLOCKD@", "yes")
+ ifneq ("@BUILD_LVMPOLLD@", "yes")
+ ifneq ("@BUILD_LVMETAD@", "yes")
+ ifeq ("@CLVMD@", "none")
DEFS += -DDEBUG_MEM
endif
endif
6 years, 4 months