1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

libdaemon: fix misleading "WARNING: Ignoring unsupported value for expected." when communicating with daemon

When we're trying to search for certain tree node
in daemon's reply, we default to a blank string ""
if the node is not found. This happens during lvmetad
initialization.

However, when the default blank string is used, we
can't use dm_config_find_str at the same time - the
dm_config_find_str_allow_empty should be used instead.
Otherwise a a warning message:

  "WARNING: Ignoring unsupported value for ..."

is issued.
This commit is contained in:
Peter Rajnoha 2014-03-24 16:47:08 +01:00
parent 9446978e64
commit c84face8ce

View File

@ -102,7 +102,7 @@ static inline int64_t daemon_reply_int(daemon_reply r, const char *path, int64_t
} }
static inline const char *daemon_reply_str(daemon_reply r, const char *path, const char *def) { static inline const char *daemon_reply_str(daemon_reply r, const char *path, const char *def) {
return dm_config_find_str(r.cft->root, path, def); return dm_config_find_str_allow_empty(r.cft->root, path, def);
} }