mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
Use 64 bit integers whenever extracting numbers from daemon replies.
This commit is contained in:
parent
db424996be
commit
31128d8747
@ -90,8 +90,8 @@ daemon_reply daemon_send_simple(daemon_handle h, const char *id, ...);
|
||||
|
||||
void daemon_reply_destroy(daemon_reply r);
|
||||
|
||||
static inline int daemon_reply_int(daemon_reply r, const char *path, int def) {
|
||||
return dm_config_find_int(r.cft->root, path, def);
|
||||
static inline int64_t daemon_reply_int(daemon_reply r, const char *path, int64_t def) {
|
||||
return dm_config_find_int64(r.cft->root, path, def);
|
||||
}
|
||||
|
||||
static inline const char *daemon_reply_str(daemon_reply r, const char *path, const char *def) {
|
||||
|
@ -1453,6 +1453,7 @@ 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);
|
||||
int64_t dm_config_find_int64(const struct dm_config_node *cn, const char *path, int64_t fail);
|
||||
float dm_config_find_float(const struct dm_config_node *cn, const char *path, float fail);
|
||||
|
||||
const struct dm_config_node *dm_config_tree_find_node(const struct dm_config_tree *cft, const char *path);
|
||||
|
@ -877,6 +877,11 @@ int dm_config_find_int(const struct dm_config_node *cn, const char *path, int fa
|
||||
return (int) _find_config_int64(cn, _find_config_node, path, (int64_t) fail);
|
||||
}
|
||||
|
||||
int64_t dm_config_find_int64(const struct dm_config_node *cn, const char *path, int64_t fail)
|
||||
{
|
||||
return _find_config_int64(cn, _find_config_node, path, fail);
|
||||
}
|
||||
|
||||
float dm_config_find_float(const struct dm_config_node *cn, const char *path,
|
||||
float fail)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user