mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
libdaemon: config_make_nodes_v needs fixing
Put the change from commit #10d27998b3d2f6100e9e29e83d1d99948c55875f back so we have working tree again for now. This code needs a bit of a cleanup to return proper return value to check...
This commit is contained in:
parent
10d27998b3
commit
1481125042
9
lib/cache/lvmetad.c
vendored
9
lib/cache/lvmetad.c
vendored
@ -148,13 +148,12 @@ static int _lvmetad_pvscan_all_devs(struct cmd_context *cmd, activation_handler
|
|||||||
static daemon_reply _lvmetad_send(const char *id, ...)
|
static daemon_reply _lvmetad_send(const char *id, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
daemon_reply repl;
|
daemon_reply repl = { 0 };
|
||||||
daemon_request req;
|
daemon_request req;
|
||||||
unsigned num_rescans = 0;
|
unsigned num_rescans = 0;
|
||||||
unsigned total_usecs_waited = 0;
|
unsigned total_usecs_waited = 0;
|
||||||
unsigned max_remaining_sleep_times = 1;
|
unsigned max_remaining_sleep_times = 1;
|
||||||
unsigned wait_usecs;
|
unsigned wait_usecs;
|
||||||
int r;
|
|
||||||
|
|
||||||
retry:
|
retry:
|
||||||
req = daemon_request_make(id);
|
req = daemon_request_make(id);
|
||||||
@ -165,12 +164,8 @@ retry:
|
|||||||
}
|
}
|
||||||
|
|
||||||
va_start(ap, id);
|
va_start(ap, id);
|
||||||
r = daemon_request_extend_v(req, ap);
|
daemon_request_extend_v(req, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
if (!r) {
|
|
||||||
repl.error = ENOMEM;
|
|
||||||
return repl;
|
|
||||||
}
|
|
||||||
|
|
||||||
repl = daemon_send(_lvmetad, req);
|
repl = daemon_send(_lvmetad, req);
|
||||||
|
|
||||||
|
@ -208,6 +208,10 @@ struct dm_config_node *make_int_node(struct dm_config_tree *cft,
|
|||||||
return cn;
|
return cn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* FIXME: return 1 even if VA list is empty and return the
|
||||||
|
* dm_config_node* result as output parameter
|
||||||
|
*/
|
||||||
struct dm_config_node *config_make_nodes_v(struct dm_config_tree *cft,
|
struct dm_config_node *config_make_nodes_v(struct dm_config_tree *cft,
|
||||||
struct dm_config_node *parent,
|
struct dm_config_node *parent,
|
||||||
struct dm_config_node *pre_sib,
|
struct dm_config_node *pre_sib,
|
||||||
|
Loading…
Reference in New Issue
Block a user