1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/libdm
Peter Rajnoha 9465963faf config: add support for config value formatting flags
There are two basic groups of formatting flags (32 bits):
  - common ones applicable for all config value types (lower 16 bits)
  - type-related formatting flags (higher 16 bits)

With this patch, we initially support four new flags that
modify the the way the config value is displayed:

  Common flags:
  =============

  DM_CONFIG_VALUE_FMT_COMMON_ARRAY - causes array config values
    to be enclosed in "[ ]" even if there's only one item
    (previously, there was no way to recognize an array with one
     item and scalar value, hence array values with one member
     were always displayed without "[ ]" which libdm accepted
     when reading, but it may have been misleading for users)

  DM_CONFIG_VALUE_FMT_COMMON_EXTRA_SPACE - causes extra spaces to
    be inserted in "key = value" (or key = [ value, value, ... ] in
    case of arrays), compared to "key=value" seen on output before.
    This makes the output more readable for users.

  Type-related flags:
  ===================

  DM_CONFIG_VALUE_FMT_INT_OCTAL - prints integers in octal form with
    "0" as a prefix (libdm's config reading code can handle this via
    strtol just fine so it's properly recognized as number in octal
    form already if there's "0" used as prefix)

  DM_CONFIG_VALUE_FMT_STRING_NO_QUOTES - makes it possible to print
    strings without enclosing " "

This patch also adds dm_config_value_set_format_flags and
dm_config_value_get_format_flags functions to set and get
these formatting flags.
2015-06-24 11:13:37 +02:00
..
datastruct Use void pointer instead of char for binary key 2011-03-10 12:48:40 +00:00
ioctl libdm: Add dm_task_get_errno to return ioctl errno. 2015-05-26 15:13:49 +01:00
misc libdm: Add DM_INTERNAL_SUSPEND_FLAG. 2015-04-23 18:39:04 +01:00
mm cleanup: indents comments backtraces 2014-11-10 22:05:49 +01:00
regex cleanup: add braces for if() 2014-07-02 10:45:43 +02:00
.exported_symbols libdm: new dm_task_get_info with internal_suspend 2015-05-15 16:48:22 +02:00
.exported_symbols.Base libdm: new dm_task_get_info with internal_suspend 2015-05-15 16:48:22 +02:00
.exported_symbols.DM_1_02_97 libdm: new dm_task_get_info with internal_suspend 2015-05-15 16:48:22 +02:00
.exported_symbols.DM_1_02_98 libdm: Add dm_task_get_errno to return ioctl errno. 2015-05-26 15:13:49 +01:00
.exported_symbols.DM_1_02_99 libdm: add dm_tree_node_set_thin_pool_read_only 2015-06-18 15:15:39 +02:00
.exported_symbols.DM_1_02_100 config: add support for config value formatting flags 2015-06-24 11:13:37 +02:00
libdevmapper.h config: add support for config value formatting flags 2015-06-24 11:13:37 +02:00
libdevmapper.pc.in Switch to use Requires.private for devmapper.pc and lvm2app.pc 2010-05-11 08:54:11 +00:00
libdm-common.c libdm-common.c: remove trailing whitespace 2015-05-12 17:16:49 +02:00
libdm-common.h libdm: introduce and use DEV_UUID macro 2012-10-10 17:16:15 +02:00
libdm-config.c config: add support for config value formatting flags 2015-06-24 11:13:37 +02:00
libdm-deptree.c libdm: add dm_tree_node_set_thin_pool_read_only 2015-06-18 15:15:39 +02:00
libdm-file.c debug: show sys errors 2015-05-08 15:15:10 +02:00
libdm-report.c cleanup: indent mismatch 2015-05-08 15:15:10 +02:00
libdm-string.c cleanup: libdm simplier error comparation 2014-07-02 10:45:42 +02:00
Makefile.in makefiles: better clean 2015-05-18 12:45:42 +02:00