mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-30 17:18:21 +03:00
Add dm_config_find_str_allow_empty
Support empty string values.
This commit is contained in:
parent
66e5b7f53c
commit
99a150fc26
@ -6,7 +6,7 @@ Version 1.02.68 -
|
||||
Improve man page style for dmsetup.
|
||||
Fix _get_proc_number to be tolerant of malformed /proc/misc entries.
|
||||
Add ExecReload to dm-event.service for systemd to reload dmeventd properly.
|
||||
Add dm_config_tree_find_str_allow_empty.
|
||||
Add dm_config_tree_find_str_allow_empty and dm_config_find_str_allow_empty.
|
||||
Fix compile-time pool memory locking with DEBUG_MEM.
|
||||
Fix valgrind error reports in free of pool chunks with DEBUG_MEM.
|
||||
Align size of structure chunk for fast pool allocator to 8 bytes.
|
||||
|
@ -1351,6 +1351,7 @@ int dm_config_write_node(const struct dm_config_node *cn, dm_putline_fn putline,
|
||||
struct dm_config_node *dm_config_find_node(struct dm_config_node *cn, const char *path);
|
||||
int dm_config_has_node(const struct dm_config_node *cn, const char *path);
|
||||
const char *dm_config_find_str(const struct dm_config_node *cn, const char *path, const char *fail);
|
||||
const char *dm_config_find_str_allow_empty(const struct dm_config_node *cn, const char *path, const char *fail);
|
||||
int dm_config_find_int(const struct dm_config_node *cn, const char *path, int fail);
|
||||
float dm_config_find_float(const struct dm_config_node *cn, const char *path, float fail);
|
||||
|
||||
|
@ -772,6 +772,12 @@ const char *dm_config_find_str(const struct dm_config_node *cn,
|
||||
return _find_config_str(cn, _find_config_node, path, fail, 0);
|
||||
}
|
||||
|
||||
const char *dm_config_find_str_allow_empty(const struct dm_config_node *cn,
|
||||
const char *path, const char *fail)
|
||||
{
|
||||
return _find_config_str(cn, _find_config_node, path, fail, 1);
|
||||
}
|
||||
|
||||
static int64_t _find_config_int64(const void *start, node_lookup_fn find,
|
||||
const char *path, int64_t fail)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user