version 1.20, 2014/10/20 22:29:25 |
version 1.21, 2014/10/27 22:23:47 |
|
|
|
|
enum cmd_retval cmd_source_file_exec(struct cmd *, struct cmd_q *); |
enum cmd_retval cmd_source_file_exec(struct cmd *, struct cmd_q *); |
|
|
void cmd_source_file_show(struct cmd_q *); |
|
void cmd_source_file_done(struct cmd_q *); |
void cmd_source_file_done(struct cmd_q *); |
|
|
const struct cmd_entry cmd_source_file_entry = { |
const struct cmd_entry cmd_source_file_entry = { |
|
|
free(cause); |
free(cause); |
return (CMD_RETURN_ERROR); |
return (CMD_RETURN_ERROR); |
} |
} |
ARRAY_ADD(&cfg_causes, cause); |
cfg_add_cause("%s", cause); |
|
free(cause); |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
case 0: |
case 0: |
if (cfg_references == 0) |
if (cfg_references == 0) |
cmd_source_file_show(cmdq); |
cfg_print_causes(cmdq); |
cmdq_free(cmdq1); |
cmdq_free(cmdq1); |
return (CMD_RETURN_NORMAL); |
return (CMD_RETURN_NORMAL); |
} |
} |
|
|
} |
} |
|
|
void |
void |
cmd_source_file_show(struct cmd_q *cmdq) |
|
{ |
|
u_int i; |
|
char *cause; |
|
|
|
for (i = 0; i < ARRAY_LENGTH(&cfg_causes); i++) { |
|
cause = ARRAY_ITEM(&cfg_causes, i); |
|
cmdq_print(cmdq, "%s", cause); |
|
free(cause); |
|
} |
|
ARRAY_FREE(&cfg_causes); |
|
} |
|
|
|
void |
|
cmd_source_file_done(struct cmd_q *cmdq1) |
cmd_source_file_done(struct cmd_q *cmdq1) |
{ |
{ |
struct cmd_q *cmdq = cmdq1->data; |
struct cmd_q *cmdq = cmdq1->data; |
|
|
return; |
return; |
|
|
if (cfg_references == 0) |
if (cfg_references == 0) |
cmd_source_file_show(cmdq); |
cfg_print_causes(cmdq); |
cmdq_continue(cmdq); |
cmdq_continue(cmdq); |
} |
} |