Fixed message reporting after command completion:
scp.c,scp.h - Gave priority to a command message handler to determine what values result in displayed messages and exported run_cmd_message for use by simulators which add simulator specific BOOT commands which leverage the run_cmd logic and should also leverage the run_cmd_message for message display VAX/vax610_sysdev.c, vax730_sys.c, vax750_cmi.c, vax780_sbi.c - Added BOOT command message dispatch to run_cmd_message for simulators which perform preprocessing on BOOT activities but otherwise then dispatch to run_cmd.
This commit is contained in:
parent
22eda8f959
commit
69666f1480
6 changed files with 22 additions and 22 deletions
|
@ -113,7 +113,7 @@ DEVICE sysd_dev = {
|
|||
|
||||
CTAB vax610_cmd[] = {
|
||||
{ "BOOT", &vax610_boot, RU_BOOT,
|
||||
"bo{ot} <device>{/R5:flg} boot device\n" },
|
||||
"bo{ot} <device>{/R5:flg} boot device\n", &run_cmd_message },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ DEVICE sysb_dev = {
|
|||
|
||||
CTAB vax730_cmd[] = {
|
||||
{ "BOOT", &vax730_boot, RU_BOOT,
|
||||
"bo{ot} <device>{/R5:flg} boot device\n" },
|
||||
"bo{ot} <device>{/R5:flg} boot device\n", &run_cmd_message },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@ DEVICE cmi_dev = {
|
|||
|
||||
CTAB vax750_cmd[] = {
|
||||
{ "BOOT", &vax750_boot, RU_BOOT,
|
||||
"bo{ot} <device>{/R5:flg} boot device\n" },
|
||||
"bo{ot} <device>{/R5:flg} boot device\n", &run_cmd_message },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@ DEVICE sbi_dev = {
|
|||
|
||||
CTAB vax780_cmd[] = {
|
||||
{ "BOOT", &vax780_boot, RU_BOOT,
|
||||
"bo{ot} <device>{/R5:flg} boot device\n" },
|
||||
"bo{ot} <device>{/R5:flg} boot device\n", &run_cmd_message },
|
||||
{ "FLOAD", &vax780_fload, 0,
|
||||
"fl{oad} <file> {<start>} load file from console floppy\n" },
|
||||
{ NULL }
|
||||
|
|
19
scp.c
19
scp.c
|
@ -420,7 +420,6 @@ t_stat set_quiet (int32 flag, char *cptr);
|
|||
t_stat set_asynch (int32 flag, char *cptr);
|
||||
t_stat do_cmd_label (int32 flag, char *cptr, char *label);
|
||||
void int_handler (int signal);
|
||||
void run_cmd_message (const char *unechod_cmdline, t_stat r);
|
||||
|
||||
/* Global data */
|
||||
|
||||
|
@ -889,15 +888,15 @@ while (stat != SCPE_EXIT) { /* in case exit */
|
|||
stat_nomessage = stat_nomessage || (!sim_show_message);/* Apply global suppression */
|
||||
stat = SCPE_BARE_STATUS(stat); /* remove possible flag */
|
||||
sim_last_cmd_stat = stat; /* save command error status */
|
||||
if ((stat >= SCPE_BASE) && (!stat_nomessage)) { /* error? */
|
||||
if (cmdp && cmdp->message) /* special message handler? */
|
||||
cmdp->message (NULL, stat);
|
||||
else {
|
||||
if (!stat_nomessage) /* displaying message status? */
|
||||
if (cmdp && (cmdp->message)) /* special message handler? */
|
||||
cmdp->message (NULL, stat); /* let it deal with display */
|
||||
else
|
||||
if (stat >= SCPE_BASE) { /* error? */
|
||||
printf ("%s\n", sim_error_text (stat));
|
||||
if (sim_log)
|
||||
fprintf (sim_log, "%s\n", sim_error_text (stat));
|
||||
}
|
||||
}
|
||||
if (sim_vm_post != NULL)
|
||||
(*sim_vm_post) (TRUE);
|
||||
} /* end while */
|
||||
|
@ -1211,11 +1210,11 @@ do {
|
|||
fprintf (sim_log, "%s> %s\n", do_position(), ocptr);
|
||||
}
|
||||
}
|
||||
if ((stat >= SCPE_BASE) && !stat_nomessage) { /* report error if not suppressed */
|
||||
if (cmdp && cmdp->message) { /* special message handler */
|
||||
if (!stat_nomessage) { /* report error if not suppressed */
|
||||
if (cmdp && cmdp->message) /* special message handler */
|
||||
cmdp->message ((!echo && !sim_quiet) ? ocptr : NULL, stat);
|
||||
}
|
||||
else {
|
||||
else
|
||||
if (stat >= SCPE_BASE) { /* report error if not suppressed */
|
||||
printf ("%s\n", sim_error_text (stat));
|
||||
if (sim_log)
|
||||
fprintf (sim_log, "%s\n", sim_error_text (stat));
|
||||
|
|
1
scp.h
1
scp.h
|
@ -59,6 +59,7 @@ t_stat exdep_cmd (int32 flag, char *ptr);
|
|||
t_stat eval_cmd (int32 flag, char *ptr);
|
||||
t_stat load_cmd (int32 flag, char *ptr);
|
||||
t_stat run_cmd (int32 flag, char *ptr);
|
||||
void run_cmd_message (const char *unechod_cmdline, t_stat r);
|
||||
t_stat attach_cmd (int32 flag, char *ptr);
|
||||
t_stat detach_cmd (int32 flag, char *ptr);
|
||||
t_stat assign_cmd (int32 flag, char *ptr);
|
||||
|
|
Loading…
Add table
Reference in a new issue