1
0
mirror of https://github.com/rcornwell/sims.git synced 2026-04-17 08:41:20 +00:00

SCP: Updated to current.

This commit is contained in:
Richard Cornwell
2021-11-10 19:40:00 -05:00
parent 4d82b16397
commit c8604f8c66
3 changed files with 23 additions and 4 deletions

19
scp.c
View File

@@ -6671,6 +6671,25 @@ if (flag) {
strlcpy (os_type, getenv ("OSTYPE"), sizeof (os_type));
setenv ("SIM_OSTYPE", os_type, 1);
}
#if defined(SIM_ARCHIVE_GIT_COMMIT_ID)
#define S_xstr(a) S_str(a)
#define S_str(a) #a
if (NULL == strchr (S_xstr(SIM_ARCHIVE_GIT_COMMIT_ID), '$')) {
const char *extras = strchr (S_xstr(SIM_ARCHIVE_GIT_COMMIT_ID), '+');
fprintf (st, "%ssimh git commit id: %8.8s%s", flag ? "\n " : " ", S_xstr(SIM_ARCHIVE_GIT_COMMIT_ID), extras ? extras : "");
setenv ("SIM_ARCHIVE_GIT_COMMIT_ID", S_xstr(SIM_ARCHIVE_GIT_COMMIT_ID), 1);
}
#if defined(SIM_ARCHIVE_GIT_COMMIT_TIME)
if (NULL == strchr (S_xstr(SIM_ARCHIVE_GIT_COMMIT_TIME), '$')) {
setenv ("SIM_ARCHIVE_GIT_COMMIT_TIME", S_xstr(SIM_ARCHIVE_GIT_COMMIT_TIME), 1);
if (flag)
fprintf (st, "%ssimh git commit time: %s", "\n ", S_xstr(SIM_ARCHIVE_GIT_COMMIT_TIME));
}
#endif
#undef S_str
#undef S_xstr
#endif
#if defined(SIM_GIT_COMMIT_ID)
#define S_xstr(a) S_str(a)
#define S_str(a) #a

View File

@@ -56,10 +56,8 @@
information as a consequence of the "sim_rev.h export-subst"
line in the .gitattributes file.
*/
#if !defined(SIM_GIT_COMMIT_ID)
#define SIM_GIT_COMMIT_ID $Format:%H$
#define SIM_GIT_COMMIT_TIME $Format:%aI$
#endif
#define SIM_ARCHIVE_GIT_COMMIT_ID $Format:%H$
#define SIM_ARCHIVE_GIT_COMMIT_TIME $Format:%aI$
/*
The comment section below reflects the manual editing process which was in place

View File

@@ -1706,7 +1706,9 @@ if (dev == NULL)
switch (dev->devtype) {
case SCSI_DISK:
case SCSI_WORM:
return sim_disk_attach_ex (uptr, cptr, dev->block_size, sizeof (uint16), (uptr->flags & SCSI_NOAUTO), SCSI_DBG_DSK, dev->name, 0, 0, drivetypes);
case SCSI_CDROM:
sim_switches |= SWMASK ('R'); /* Force Read Only Attach for CDROM */
return sim_disk_attach_ex (uptr, cptr, dev->block_size, sizeof (uint16), (uptr->flags & SCSI_NOAUTO), SCSI_DBG_DSK, dev->name, 0, 0, drivetypes);
case SCSI_TAPE:
return sim_tape_attach_ex (uptr, cptr, SCSI_DBG_TAP, 0);