Lines Matching defs:role
73 uint8_t role, struct hast_resource *res, const char *name, unsigned int no)
96 /* Send previous role back. */
97 nv_add_string(nvout, role2str(res->hr_role), "role%u", no);
100 if (role == res->hr_role)
104 pjdlog_info("Role changed to %s.", role2str(role));
106 /* Change role to the new one. */
108 res->hr_role = role;
112 * If previous role was primary or secondary we have to kill process
133 if (role == HAST_ROLE_PRIMARY)
136 hook_exec(res->hr_exec, "role", res->hr_name, role2str(oldrole),
141 control_set_role(struct hast_resource *res, uint8_t role)
144 control_set_role_common(NULL, NULL, role, res, NULL, 0);
281 nv_add_string(nvout, role2str(res->hr_role), "role%u", no);
310 uint8_t cmd, role;
320 role = HAST_ROLE_UNDEF;
351 role = nv_get_uint8(nvin, "role");
352 switch (role) {
358 pjdlog_error("Invalid role received (%hhu).", role);
372 control_set_role_common(cfg, nvout, role, res,
395 control_set_role_common(cfg, nvout, role, NULL,