1
0
mirror of https://github.com/open-simh/simh.git synced 2026-03-02 01:50:56 +00:00

SCP: Specify detail in detach messages for buffered files

This commit is contained in:
Mark Pizzolato
2021-01-12 05:26:23 -08:00
parent 6cfd55180f
commit 597178fc26

4
scp.c
View File

@@ -7878,11 +7878,11 @@ if ((dptr = find_dev_from_unit (uptr)) == NULL)
if ((uptr->flags & UNIT_BUF) && (uptr->filebuf)) {
uint32 cap = (uptr->hwmark + dptr->aincr - 1) / dptr->aincr;
if (uptr->hwmark && ((uptr->flags & UNIT_RO) == 0)) {
sim_messagef (SCPE_OK, "%s: writing buffer to file\n", sim_dname (dptr));
sim_messagef (SCPE_OK, "%s: writing buffer to file: %s\n", sim_uname (dptr), uptr->filename);
rewind (uptr->fileref);
sim_fwrite (uptr->filebuf, SZ_D (dptr), cap, uptr->fileref);
if (ferror (uptr->fileref))
sim_printf ("%s: I/O error - %s", sim_dname (dptr), strerror (errno));
sim_printf ("%s: I/O error - %s", sim_uname (dptr), strerror (errno));
}
if (uptr->flags & UNIT_MUSTBUF) { /* dyn alloc? */
free (uptr->filebuf); /* free buf */