version 1.106, 2021/08/21 10:28:05 |
version 1.107, 2021/08/21 17:25:32 |
|
|
} |
} |
} |
} |
|
|
|
/* Empty command callback. */ |
|
static enum cmd_retval |
|
cmdq_empty_command(__unused struct cmdq_item *item, __unused void *data) |
|
{ |
|
return (CMD_RETURN_NORMAL); |
|
} |
|
|
/* Get a command for the command queue. */ |
/* Get a command for the command queue. */ |
struct cmdq_item * |
struct cmdq_item * |
cmdq_get_command(struct cmd_list *cmdlist, struct cmdq_state *state) |
cmdq_get_command(struct cmd_list *cmdlist, struct cmdq_state *state) |
|
|
const struct cmd_entry *entry; |
const struct cmd_entry *entry; |
int created = 0; |
int created = 0; |
|
|
|
if ((cmd = cmd_list_first(cmdlist)) == NULL) |
|
return (cmdq_get_callback(cmdq_empty_command, NULL)); |
|
|
if (state == NULL) { |
if (state == NULL) { |
state = cmdq_new_state(NULL, NULL, 0); |
state = cmdq_new_state(NULL, NULL, 0); |
created = 1; |
created = 1; |
} |
} |
|
|
cmd = cmd_list_first(cmdlist); |
|
while (cmd != NULL) { |
while (cmd != NULL) { |
entry = cmd_get_entry(cmd); |
entry = cmd_get_entry(cmd); |
|
|