Commit ff3548df authored by Daniel Salzman's avatar Daniel Salzman

knotc: send FORCE flag if provided

parent e51baf78
......@@ -273,7 +273,10 @@ static int zone_flush(zone_t *zone, ctl_args_t *args)
{
UNUSED(args);
zone->flags |= ZONE_FORCE_FLUSH;
if (ctl_has_flag(args->data[KNOT_CTL_IDX_FLAGS], CTL_FLAG_FORCE)) {
zone->flags |= ZONE_FORCE_FLUSH;
}
zone_events_schedule(zone, ZONE_EVENT_FLUSH, ZONE_EVENT_NOW);
return KNOT_EOK;
......
......@@ -325,7 +325,8 @@ static int cmd_ctl(cmd_args_t *args)
}
knot_ctl_data_t data = {
[KNOT_CTL_IDX_CMD] = ctl_cmd_to_str(args->desc->cmd)
[KNOT_CTL_IDX_CMD] = ctl_cmd_to_str(args->desc->cmd),
[KNOT_CTL_IDX_FLAGS] = args->force ? CTL_FLAG_FORCE : ""
};
// Send the command.
......@@ -488,7 +489,8 @@ static int cmd_zone_memstats(cmd_args_t *args)
static int cmd_zone_ctl(cmd_args_t *args)
{
knot_ctl_data_t data = {
[KNOT_CTL_IDX_CMD] = ctl_cmd_to_str(args->desc->cmd)
[KNOT_CTL_IDX_CMD] = ctl_cmd_to_str(args->desc->cmd),
[KNOT_CTL_IDX_FLAGS] = args->force ? CTL_FLAG_FORCE : ""
};
if (args->argc == 0) {
......@@ -615,7 +617,8 @@ static int cmd_conf_ctl(cmd_args_t *args)
}
knot_ctl_data_t data = {
[KNOT_CTL_IDX_CMD] = ctl_cmd_to_str(args->desc->cmd)
[KNOT_CTL_IDX_CMD] = ctl_cmd_to_str(args->desc->cmd),
[KNOT_CTL_IDX_FLAGS] = args->force ? CTL_FLAG_FORCE : ""
};
// Send the command without parameters.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment