mirror of
https://github.com/simh/simh.git
synced 2026-01-27 04:22:24 +00:00
All: Convert from C runtime library perror() to sim_perror so that all messages will arrive in the same place(s).
This commit is contained in:
7
scp.c
7
scp.c
@@ -5272,7 +5272,7 @@ if (uptr->flags & UNIT_BUF) {
|
||||
rewind (uptr->fileref);
|
||||
sim_fwrite (uptr->filebuf, SZ_D (dptr), cap, uptr->fileref);
|
||||
if (ferror (uptr->fileref))
|
||||
perror ("I/O error");
|
||||
sim_printf ("%s: I/O error - %s", sim_dname (dptr), strerror (errno));
|
||||
}
|
||||
if (uptr->flags & UNIT_MUSTBUF) { /* dyn alloc? */
|
||||
free (uptr->filebuf); /* free buf */
|
||||
@@ -9581,6 +9581,11 @@ if (buf != stackbuf)
|
||||
free (buf);
|
||||
}
|
||||
|
||||
void sim_perror (const char *msg)
|
||||
{
|
||||
sim_printf ("%s: %s\n", msg, strerror (errno));
|
||||
}
|
||||
|
||||
/* Print command result message to stdout, sim_log (if enabled) and sim_deb (if enabled) */
|
||||
t_stat sim_messagef (t_stat stat, const char* fmt, ...)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user