Merge git://github.com/simh/simh
This commit is contained in:
commit
e15b09fcb7
8 changed files with 77 additions and 91 deletions
|
@ -1013,6 +1013,8 @@ t_stat cr_wr ( int32 data,
|
||||||
int32 PA,
|
int32 PA,
|
||||||
int32 access )
|
int32 access )
|
||||||
{
|
{
|
||||||
|
int curr_crs = crs; /* Save current crs to recover status */
|
||||||
|
|
||||||
switch ((PA >> 1) & 03) {
|
switch ((PA >> 1) & 03) {
|
||||||
case 0:
|
case 0:
|
||||||
if (CR11_CTL(&cr_unit)) {
|
if (CR11_CTL(&cr_unit)) {
|
||||||
|
@ -1024,7 +1026,6 @@ t_stat cr_wr ( int32 data,
|
||||||
data = (crs & ~0377) | (data & 0377);
|
data = (crs & ~0377) | (data & 0377);
|
||||||
if (!(data & CSR_IE))
|
if (!(data & CSR_IE))
|
||||||
CLR_INT (CR);
|
CLR_INT (CR);
|
||||||
int curr_crs = crs; /* Save current crs to recover status */
|
|
||||||
crs = (crs & ~CRCSR_RW) | (data & CRCSR_RW);
|
crs = (crs & ~CRCSR_RW) | (data & CRCSR_RW);
|
||||||
/* Clear status bits after CSR load */
|
/* Clear status bits after CSR load */
|
||||||
crs &= ~(CSR_ERR | CRCSR_ONLINE | CRCSR_CRDDONE | CRCSR_TIMERR);
|
crs &= ~(CSR_ERR | CRCSR_ONLINE | CRCSR_CRDDONE | CRCSR_TIMERR);
|
||||||
|
|
|
@ -3574,7 +3574,9 @@ uint32 i, j;
|
||||||
sim_debug(DBG_TRC, dptr, "dmc_reset(%s)\n", dptr->name);
|
sim_debug(DBG_TRC, dptr, "dmc_reset(%s)\n", dptr->name);
|
||||||
|
|
||||||
dmc_desc.packet = TRUE;
|
dmc_desc.packet = TRUE;
|
||||||
|
dmc_desc.buffered = 16384;
|
||||||
dmp_desc.packet = TRUE;
|
dmp_desc.packet = TRUE;
|
||||||
|
dmp_desc.buffered = 16384;
|
||||||
/* Connect structures together */
|
/* Connect structures together */
|
||||||
for (i=0; i < DMC_NUMDEVICE; i++) {
|
for (i=0; i < DMC_NUMDEVICE; i++) {
|
||||||
dmc_csrs[i].sel0 = &dmc_sel0[i];
|
dmc_csrs[i].sel0 = &dmc_sel0[i];
|
||||||
|
@ -3738,7 +3740,7 @@ if (!peer[0]) {
|
||||||
fprintf (sim_log, "Peer must be specified before attach\n");
|
fprintf (sim_log, "Peer must be specified before attach\n");
|
||||||
return SCPE_ARG;
|
return SCPE_ARG;
|
||||||
}
|
}
|
||||||
sprintf (attach_string, "Line=%d,Buffered=16384,Connect=%s,%s", dmc, peer, cptr);
|
sprintf (attach_string, "Line=%d,Connect=%s,%s", dmc, peer, cptr);
|
||||||
ans = tmxr_open_master (mp, attach_string); /* open master socket */
|
ans = tmxr_open_master (mp, attach_string); /* open master socket */
|
||||||
if (ans != SCPE_OK)
|
if (ans != SCPE_OK)
|
||||||
return ans;
|
return ans;
|
||||||
|
|
8
scp.c
8
scp.c
|
@ -484,7 +484,6 @@ FILEREF *sim_log_ref = NULL; /* log file file referen
|
||||||
FILE *sim_deb = NULL; /* debug file */
|
FILE *sim_deb = NULL; /* debug file */
|
||||||
FILEREF *sim_deb_ref = NULL; /* debug file file reference */
|
FILEREF *sim_deb_ref = NULL; /* debug file file reference */
|
||||||
int32 sim_deb_switches = 0; /* debug switches */
|
int32 sim_deb_switches = 0; /* debug switches */
|
||||||
REG *sim_deb_PC = NULL; /* debug PC register pointer */
|
|
||||||
struct timespec sim_deb_basetime; /* debug timestamp relative base time */
|
struct timespec sim_deb_basetime; /* debug timestamp relative base time */
|
||||||
char *sim_prompt = NULL; /* prompt string */
|
char *sim_prompt = NULL; /* prompt string */
|
||||||
static FILE *sim_gotofile; /* the currently open do file */
|
static FILE *sim_gotofile; /* the currently open do file */
|
||||||
|
@ -568,6 +567,7 @@ const struct scp_error {
|
||||||
{"STALL", "Console Telnet output stall"},
|
{"STALL", "Console Telnet output stall"},
|
||||||
{"AFAIL", "Assertion failed"},
|
{"AFAIL", "Assertion failed"},
|
||||||
{"INVREM", "Invalid remote console command"},
|
{"INVREM", "Invalid remote console command"},
|
||||||
|
{"NOTATT", "Not attached"},
|
||||||
};
|
};
|
||||||
|
|
||||||
const size_t size_map[] = { sizeof (int8),
|
const size_t size_map[] = { sizeof (int8),
|
||||||
|
@ -7826,9 +7826,9 @@ if (sim_deb_switches & SWMASK ('P')) {
|
||||||
if (sim_vm_pc_value)
|
if (sim_vm_pc_value)
|
||||||
val = (*sim_vm_pc_value)();
|
val = (*sim_vm_pc_value)();
|
||||||
else
|
else
|
||||||
val = get_rval (sim_deb_PC, 0);
|
val = get_rval (sim_PC, 0);
|
||||||
sprintf(pc_s, "-%s:", sim_deb_PC->name);
|
sprintf(pc_s, "-%s:", sim_PC->name);
|
||||||
sprint_val (&pc_s[strlen(pc_s)], val, sim_deb_PC->radix, sim_deb_PC->width, sim_deb_PC->flags & REG_FMT);
|
sprint_val (&pc_s[strlen(pc_s)], val, sim_PC->radix, sim_PC->width, sim_PC->flags & REG_FMT);
|
||||||
}
|
}
|
||||||
sprintf(debug_line_prefix, "DBG(%s%s%.0f%s)%s> %s %s: ", tim_t, tim_a, sim_gtime(), pc_s, AIO_MAIN_THREAD ? "" : "+", dptr->name, debug_type);
|
sprintf(debug_line_prefix, "DBG(%s%s%.0f%s)%s> %s %s: ", tim_t, tim_a, sim_gtime(), pc_s, AIO_MAIN_THREAD ? "" : "+", dptr->name, debug_type);
|
||||||
return debug_line_prefix;
|
return debug_line_prefix;
|
||||||
|
|
1
scp.h
1
scp.h
|
@ -180,7 +180,6 @@ extern FILE *sim_deb; /* debug file */
|
||||||
extern FILEREF *sim_deb_ref; /* debug file file reference */
|
extern FILEREF *sim_deb_ref; /* debug file file reference */
|
||||||
extern int32 sim_deb_switches; /* debug display flags */
|
extern int32 sim_deb_switches; /* debug display flags */
|
||||||
extern struct timespec sim_deb_basetime; /* debug base time for relative time output */
|
extern struct timespec sim_deb_basetime; /* debug base time for relative time output */
|
||||||
extern REG *sim_deb_PC; /* debug PC register */
|
|
||||||
extern UNIT *sim_clock_queue;
|
extern UNIT *sim_clock_queue;
|
||||||
extern int32 sim_is_running;
|
extern int32 sim_is_running;
|
||||||
extern char *sim_prompt; /* prompt string */
|
extern char *sim_prompt; /* prompt string */
|
||||||
|
|
|
@ -1063,8 +1063,6 @@ if (sim_deb_switches & SWMASK ('R')) {
|
||||||
if (!(sim_deb_switches & (SWMASK ('A') | SWMASK ('T'))))
|
if (!(sim_deb_switches & (SWMASK ('A') | SWMASK ('T'))))
|
||||||
sim_deb_switches |= SWMASK ('T');
|
sim_deb_switches |= SWMASK ('T');
|
||||||
}
|
}
|
||||||
if (sim_deb_switches & SWMASK ('P'))
|
|
||||||
sim_deb_PC = find_reg ("PC", NULL, sim_dflt_dev);
|
|
||||||
if (!sim_quiet) {
|
if (!sim_quiet) {
|
||||||
printf ("Debug output to \"%s\"\n",
|
printf ("Debug output to \"%s\"\n",
|
||||||
sim_logfile_name (sim_deb, sim_deb_ref));
|
sim_logfile_name (sim_deb, sim_deb_ref));
|
||||||
|
@ -1126,7 +1124,6 @@ if (sim_deb == NULL) /* no debug? */
|
||||||
sim_close_logfile (&sim_deb_ref);
|
sim_close_logfile (&sim_deb_ref);
|
||||||
sim_deb = NULL;
|
sim_deb = NULL;
|
||||||
sim_deb_switches = 0;
|
sim_deb_switches = 0;
|
||||||
sim_deb_PC = NULL;
|
|
||||||
if (!sim_quiet) {
|
if (!sim_quiet) {
|
||||||
printf ("Debug output disabled\n");
|
printf ("Debug output disabled\n");
|
||||||
if (sim_log)
|
if (sim_log)
|
||||||
|
|
10
sim_defs.h
10
sim_defs.h
|
@ -304,8 +304,9 @@ typedef uint32 t_addr;
|
||||||
#define SCPE_STALL (SCPE_BASE + 41) /* Telnet conn stall */
|
#define SCPE_STALL (SCPE_BASE + 41) /* Telnet conn stall */
|
||||||
#define SCPE_AFAIL (SCPE_BASE + 42) /* assert failed */
|
#define SCPE_AFAIL (SCPE_BASE + 42) /* assert failed */
|
||||||
#define SCPE_INVREM (SCPE_BASE + 43) /* invalid remote console command */
|
#define SCPE_INVREM (SCPE_BASE + 43) /* invalid remote console command */
|
||||||
|
#define SCPE_NOTATT (SCPE_BASE + 44) /* not attached */
|
||||||
|
|
||||||
#define SCPE_MAX_ERR (SCPE_BASE + 44) /* Maximum SCPE Error Value */
|
#define SCPE_MAX_ERR (SCPE_BASE + 45) /* Maximum SCPE Error Value */
|
||||||
#define SCPE_KFLAG 0x1000 /* tti data flag */
|
#define SCPE_KFLAG 0x1000 /* tti data flag */
|
||||||
#define SCPE_BREAK 0x2000 /* tti break flag */
|
#define SCPE_BREAK 0x2000 /* tti break flag */
|
||||||
#define SCPE_NOMESSAGE 0x10000000 /* message display supression flag */
|
#define SCPE_NOMESSAGE 0x10000000 /* message display supression flag */
|
||||||
|
@ -747,9 +748,10 @@ typedef struct sim_bitfield BITFIELD;
|
||||||
/* This replaces any references to "assert()" which should never be invoked */
|
/* This replaces any references to "assert()" which should never be invoked */
|
||||||
/* with an expression which causes side effects (i.e. must be executed for */
|
/* with an expression which causes side effects (i.e. must be executed for */
|
||||||
/* the program to work correctly) */
|
/* the program to work correctly) */
|
||||||
#define ASSURE(_Expression) if (_Expression) {fprintf(stderr, "%s failed at %s line %d\n", #_Expression, __FILE__, __LINE__); \
|
#define ASSURE(_Expression) if (!(_Expression)) {char *_exp = #_Expression; char *_file = __FILE__; \
|
||||||
if (sim_log) fprintf(sim_log, "%s failed at %s line %d\n", #_Expression, __FILE__, __LINE__); \
|
fprintf(stderr, "%s failed at %s line %d\n", _exp, _file, __LINE__); \
|
||||||
if (sim_deb) fprintf(sim_deb, "%s failed at %s line %d\n", #_Expression, __FILE__, __LINE__); \
|
if (sim_log) fprintf(sim_log, "%s failed at %s line %d\n", _exp, _file, __LINE__); \
|
||||||
|
if (sim_deb) fprintf(sim_deb, "%s failed at %s line %d\n", _exp, _file, __LINE__); \
|
||||||
abort();} else (void)0
|
abort();} else (void)0
|
||||||
|
|
||||||
/* Asynch/Threaded I/O support */
|
/* Asynch/Threaded I/O support */
|
||||||
|
|
85
sim_disk.c
85
sim_disk.c
|
@ -1198,7 +1198,7 @@ FILE *fileref;
|
||||||
t_bool auto_format;
|
t_bool auto_format;
|
||||||
|
|
||||||
if ((uptr == NULL) || !(uptr->flags & UNIT_ATT))
|
if ((uptr == NULL) || !(uptr->flags & UNIT_ATT))
|
||||||
return SCPE_IERR;
|
return SCPE_NOTATT;
|
||||||
|
|
||||||
ctx = (struct disk_context *)uptr->disk_ctx;
|
ctx = (struct disk_context *)uptr->disk_ctx;
|
||||||
fileref = uptr->fileref;
|
fileref = uptr->fileref;
|
||||||
|
@ -1322,7 +1322,7 @@ fprintf (st, " Volume Serial Number is F8DE-510C\n\n");
|
||||||
fprintf (st, " Directory of H:\\Data\n\n");
|
fprintf (st, " Directory of H:\\Data\n\n");
|
||||||
fprintf (st, " 04/14/2011 12:57 PM 5,120 RA92.vhd\n");
|
fprintf (st, " 04/14/2011 12:57 PM 5,120 RA92.vhd\n");
|
||||||
fprintf (st, " 1 File(s) 5,120 bytes\n");
|
fprintf (st, " 1 File(s) 5,120 bytes\n");
|
||||||
fprintf (st, " sim> atta rq3 -c RA92-1.vhd RA92.vhd\n");
|
fprintf (st, " sim> atta rq3 -d RA92-1-Diff.vhd RA92.vhd\n");
|
||||||
fprintf (st, " sim> atta rq3 -c RA92-1.vhd RA92.vhd\n");
|
fprintf (st, " sim> atta rq3 -c RA92-1.vhd RA92.vhd\n");
|
||||||
fprintf (st, " RQ3: creating new virtual disk 'RA92-1.vhd'\n");
|
fprintf (st, " RQ3: creating new virtual disk 'RA92-1.vhd'\n");
|
||||||
fprintf (st, " RQ3: Copied 1505MB. 99%% complete.\n");
|
fprintf (st, " RQ3: Copied 1505MB. 99%% complete.\n");
|
||||||
|
@ -2670,7 +2670,7 @@ if (!File) {
|
||||||
goto Return_Cleanup;
|
goto Return_Cleanup;
|
||||||
}
|
}
|
||||||
if (ModifiedTimeStamp) {
|
if (ModifiedTimeStamp) {
|
||||||
if (stat (szVHDPath, &statb)) {
|
if (fstat (fileno (File), &statb)) {
|
||||||
Return = errno;
|
Return = errno;
|
||||||
goto Return_Cleanup;
|
goto Return_Cleanup;
|
||||||
}
|
}
|
||||||
|
@ -3516,31 +3516,22 @@ for (i=0; i < strlen(RelativeParentVHDPath); i++)
|
||||||
RelativeParentVHDPathUnicode[i*2] = RelativeParentVHDPath[i];
|
RelativeParentVHDPathUnicode[i*2] = RelativeParentVHDPath[i];
|
||||||
hVHD->Dynamic.ParentTimeStamp = ParentTimeStamp;
|
hVHD->Dynamic.ParentTimeStamp = ParentTimeStamp;
|
||||||
memcpy (hVHD->Dynamic.ParentUniqueID, ParentFooter.UniqueID, sizeof (hVHD->Dynamic.ParentUniqueID));
|
memcpy (hVHD->Dynamic.ParentUniqueID, ParentFooter.UniqueID, sizeof (hVHD->Dynamic.ParentUniqueID));
|
||||||
hVHD->Dynamic.ParentLocatorEntries[7].PlatformDataSpace = NtoHl (BytesPerSector);
|
/* There are two potential parent locators on current vhds */
|
||||||
hVHD->Dynamic.ParentLocatorEntries[7].Reserved = 0;
|
memcpy (hVHD->Dynamic.ParentLocatorEntries[0].PlatformCode, "W2ku", 4);
|
||||||
hVHD->Dynamic.ParentLocatorEntries[7].PlatformDataOffset = NtoHll (LocatorPosition+LocatorsWritten*BytesPerSector);
|
hVHD->Dynamic.ParentLocatorEntries[0].PlatformDataSpace = NtoHl (BytesPerSector);
|
||||||
++LocatorsWritten;
|
hVHD->Dynamic.ParentLocatorEntries[0].PlatformDataLength = NtoHl ((uint32)(2*strlen(FullParentVHDPath)));
|
||||||
memcpy (hVHD->Dynamic.ParentLocatorEntries[6].PlatformCode, "Wi2k", 4);
|
hVHD->Dynamic.ParentLocatorEntries[0].Reserved = 0;
|
||||||
hVHD->Dynamic.ParentLocatorEntries[6].PlatformDataSpace = NtoHl (BytesPerSector);
|
hVHD->Dynamic.ParentLocatorEntries[0].PlatformDataOffset = NtoHll (LocatorPosition+LocatorsWritten*BytesPerSector);
|
||||||
hVHD->Dynamic.ParentLocatorEntries[6].Reserved = 0;
|
|
||||||
hVHD->Dynamic.ParentLocatorEntries[6].PlatformDataOffset = NtoHll (LocatorPosition+LocatorsWritten*BytesPerSector);
|
|
||||||
++LocatorsWritten;
|
++LocatorsWritten;
|
||||||
if (RelativeMatch) {
|
if (RelativeMatch) {
|
||||||
memcpy (hVHD->Dynamic.ParentLocatorEntries[7].PlatformCode, "Wi2r", 4);
|
memcpy (hVHD->Dynamic.ParentLocatorEntries[1].PlatformCode, "W2ru", 4);
|
||||||
hVHD->Dynamic.ParentLocatorEntries[7].PlatformDataLength = NtoHl ((uint32)(strlen(RelativeParentVHDPath)));
|
hVHD->Dynamic.ParentLocatorEntries[1].PlatformDataSpace = NtoHl (BytesPerSector);
|
||||||
memcpy (hVHD->Dynamic.ParentLocatorEntries[5].PlatformCode, "W2ru", 4);
|
hVHD->Dynamic.ParentLocatorEntries[1].PlatformDataLength = NtoHl ((uint32)(2*strlen(RelativeParentVHDPath)));
|
||||||
hVHD->Dynamic.ParentLocatorEntries[5].PlatformDataSpace = NtoHl (BytesPerSector);
|
hVHD->Dynamic.ParentLocatorEntries[1].Reserved = 0;
|
||||||
hVHD->Dynamic.ParentLocatorEntries[5].PlatformDataLength = NtoHl ((uint32)(2*strlen(RelativeParentVHDPath)));
|
hVHD->Dynamic.ParentLocatorEntries[1].PlatformDataOffset = NtoHll (LocatorPosition+LocatorsWritten*BytesPerSector);
|
||||||
hVHD->Dynamic.ParentLocatorEntries[5].Reserved = 0;
|
|
||||||
hVHD->Dynamic.ParentLocatorEntries[5].PlatformDataOffset = NtoHll (LocatorPosition+LocatorsWritten*BytesPerSector);
|
|
||||||
++LocatorsWritten;
|
++LocatorsWritten;
|
||||||
}
|
}
|
||||||
memcpy (hVHD->Dynamic.ParentLocatorEntries[4].PlatformCode, "W2ku", 4);
|
hVHD->Dynamic.TableOffset = NtoHll (((LocatorPosition+LocatorsWritten*BytesPerSector + VHD_DATA_BLOCK_ALIGNMENT - 1)/VHD_DATA_BLOCK_ALIGNMENT)*VHD_DATA_BLOCK_ALIGNMENT);
|
||||||
hVHD->Dynamic.ParentLocatorEntries[4].PlatformDataSpace = NtoHl (BytesPerSector);
|
|
||||||
hVHD->Dynamic.ParentLocatorEntries[4].PlatformDataLength = NtoHl ((uint32)(2*strlen(FullParentVHDPath)));
|
|
||||||
hVHD->Dynamic.ParentLocatorEntries[4].Reserved = 0;
|
|
||||||
hVHD->Dynamic.ParentLocatorEntries[4].PlatformDataOffset = NtoHll (LocatorPosition+LocatorsWritten*BytesPerSector);
|
|
||||||
++LocatorsWritten;
|
|
||||||
hVHD->Dynamic.Checksum = NtoHl (CalculateVhdFooterChecksum (&hVHD->Dynamic, sizeof(hVHD->Dynamic)));
|
hVHD->Dynamic.Checksum = NtoHl (CalculateVhdFooterChecksum (&hVHD->Dynamic, sizeof(hVHD->Dynamic)));
|
||||||
hVHD->Footer.Checksum = 0;
|
hVHD->Footer.Checksum = 0;
|
||||||
hVHD->Footer.DiskType = NtoHl (VHD_DT_Differencing);
|
hVHD->Footer.DiskType = NtoHl (VHD_DT_Differencing);
|
||||||
|
@ -3563,6 +3554,14 @@ if (WriteFilePosition (hVHD->File,
|
||||||
Status = errno;
|
Status = errno;
|
||||||
goto Cleanup_Return;
|
goto Cleanup_Return;
|
||||||
}
|
}
|
||||||
|
if (WriteFilePosition (hVHD->File,
|
||||||
|
hVHD->BAT,
|
||||||
|
BytesPerSector*((NtoHl (hVHD->Dynamic.MaxTableEntries)*sizeof(*hVHD->BAT)+BytesPerSector-1)/BytesPerSector),
|
||||||
|
NULL,
|
||||||
|
NtoHll (hVHD->Dynamic.TableOffset))) {
|
||||||
|
Status = errno;
|
||||||
|
goto Cleanup_Return;
|
||||||
|
}
|
||||||
if (WriteFilePosition (hVHD->File,
|
if (WriteFilePosition (hVHD->File,
|
||||||
&hVHD->Footer,
|
&hVHD->Footer,
|
||||||
sizeof (hVHD->Footer),
|
sizeof (hVHD->Footer),
|
||||||
|
@ -3571,35 +3570,21 @@ if (WriteFilePosition (hVHD->File,
|
||||||
Status = errno;
|
Status = errno;
|
||||||
goto Cleanup_Return;
|
goto Cleanup_Return;
|
||||||
}
|
}
|
||||||
if (WriteFilePosition (hVHD->File,
|
if (hVHD->Dynamic.ParentLocatorEntries[0].PlatformDataLength)
|
||||||
RelativeParentVHDPath,
|
|
||||||
BytesPerSector,
|
|
||||||
NULL,
|
|
||||||
NtoHll (hVHD->Dynamic.ParentLocatorEntries[7].PlatformDataOffset))) {
|
|
||||||
Status = errno;
|
|
||||||
goto Cleanup_Return;
|
|
||||||
}
|
|
||||||
if (WriteFilePosition (hVHD->File,
|
|
||||||
FullParentVHDPath,
|
|
||||||
BytesPerSector,
|
|
||||||
NULL,
|
|
||||||
NtoHll (hVHD->Dynamic.ParentLocatorEntries[6].PlatformDataOffset))) {
|
|
||||||
Status = errno;
|
|
||||||
goto Cleanup_Return;
|
|
||||||
}
|
|
||||||
if (WriteFilePosition (hVHD->File,
|
|
||||||
RelativeParentVHDPathUnicode,
|
|
||||||
BytesPerSector,
|
|
||||||
NULL,
|
|
||||||
NtoHll (hVHD->Dynamic.ParentLocatorEntries[5].PlatformDataOffset))) {
|
|
||||||
Status = errno;
|
|
||||||
goto Cleanup_Return;
|
|
||||||
}
|
|
||||||
if (WriteFilePosition (hVHD->File,
|
if (WriteFilePosition (hVHD->File,
|
||||||
FullParentVHDPathUnicode,
|
FullParentVHDPathUnicode,
|
||||||
BytesPerSector,
|
BytesPerSector,
|
||||||
NULL,
|
NULL,
|
||||||
NtoHll (hVHD->Dynamic.ParentLocatorEntries[4].PlatformDataOffset))) {
|
NtoHll (hVHD->Dynamic.ParentLocatorEntries[0].PlatformDataOffset))) {
|
||||||
|
Status = errno;
|
||||||
|
goto Cleanup_Return;
|
||||||
|
}
|
||||||
|
if (hVHD->Dynamic.ParentLocatorEntries[1].PlatformDataLength)
|
||||||
|
if (WriteFilePosition (hVHD->File,
|
||||||
|
RelativeParentVHDPathUnicode,
|
||||||
|
BytesPerSector,
|
||||||
|
NULL,
|
||||||
|
NtoHll (hVHD->Dynamic.ParentLocatorEntries[1].PlatformDataOffset))) {
|
||||||
Status = errno;
|
Status = errno;
|
||||||
goto Cleanup_Return;
|
goto Cleanup_Return;
|
||||||
}
|
}
|
||||||
|
@ -3613,7 +3598,7 @@ free (FullVHDPath);
|
||||||
sim_vhd_disk_close ((FILE *)hVHD);
|
sim_vhd_disk_close ((FILE *)hVHD);
|
||||||
hVHD = NULL;
|
hVHD = NULL;
|
||||||
if (Status) {
|
if (Status) {
|
||||||
if (EEXIST != Status)
|
if ((EEXIST != Status) && (ENOENT != Status))
|
||||||
remove (szVHDPath);
|
remove (szVHDPath);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
18
sim_tmxr.c
18
sim_tmxr.c
|
@ -831,7 +831,7 @@ if (mp->buffered)
|
||||||
if (mp->logfiletmpl[0]) /* logfile info */
|
if (mp->logfiletmpl[0]) /* logfile info */
|
||||||
sprintf (growstring(&tptr, 7 + strlen (mp->logfiletmpl)), ",Log=%s", mp->logfiletmpl);
|
sprintf (growstring(&tptr, 7 + strlen (mp->logfiletmpl)), ",Log=%s", mp->logfiletmpl);
|
||||||
while ((*tptr == ',') || (*tptr == ' '))
|
while ((*tptr == ',') || (*tptr == ' '))
|
||||||
strcpy(tptr, tptr+1);
|
memcpy (tptr, tptr+1, strlen(tptr+1)+1);
|
||||||
for (i=0; i<mp->lines; ++i) {
|
for (i=0; i<mp->lines; ++i) {
|
||||||
char *lptr;
|
char *lptr;
|
||||||
lp = mp->ldsc + i;
|
lp = mp->ldsc + i;
|
||||||
|
@ -844,7 +844,7 @@ for (i=0; i<mp->lines; ++i) {
|
||||||
}
|
}
|
||||||
if (mp->lines == 1)
|
if (mp->lines == 1)
|
||||||
while ((*tptr == ',') || (*tptr == ' '))
|
while ((*tptr == ',') || (*tptr == ' '))
|
||||||
strcpy(tptr, tptr+1);
|
memcpy (tptr, tptr+1, strlen(tptr+1)+1);
|
||||||
if (*tptr == '\0') {
|
if (*tptr == '\0') {
|
||||||
free (tptr);
|
free (tptr);
|
||||||
tptr = NULL;
|
tptr = NULL;
|
||||||
|
@ -1238,13 +1238,6 @@ if ((lp->destination) && (!lp->serport)) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tmxr_init_line (lp); /* initialize line state */
|
tmxr_init_line (lp); /* initialize line state */
|
||||||
if (lp->mp->uptr) {
|
|
||||||
/* Revise the unit's connect string to reflect the current attachments */
|
|
||||||
lp->mp->uptr->filename = tmxr_mux_attach_string (lp->mp->uptr->filename, lp->mp);
|
|
||||||
/* No connections or listeners exist, then we're equivalent to being fully detached. We should reflect that */
|
|
||||||
if (lp->mp->uptr->filename == NULL)
|
|
||||||
tmxr_detach (lp->mp, lp->mp->uptr);
|
|
||||||
}
|
|
||||||
return SCPE_OK;
|
return SCPE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2031,6 +2024,13 @@ if (lp->serport) { /* close current serial connection *
|
||||||
lp->destination = NULL;
|
lp->destination = NULL;
|
||||||
}
|
}
|
||||||
tmxr_set_line_loopback (lp, FALSE);
|
tmxr_set_line_loopback (lp, FALSE);
|
||||||
|
if ((lp->mp->uptr) && ((lp->uptr == NULL) || (lp->uptr == lp->mp->uptr))) {
|
||||||
|
/* Revise the unit's connect string to reflect the current attachments */
|
||||||
|
lp->mp->uptr->filename = tmxr_mux_attach_string (lp->mp->uptr->filename, lp->mp);
|
||||||
|
/* No connections or listeners exist, then we're equivalent to being fully detached. We should reflect that */
|
||||||
|
if (lp->mp->uptr->filename == NULL)
|
||||||
|
tmxr_detach (lp->mp, lp->mp->uptr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
t_stat tmxr_detach_ln (TMLN *lp)
|
t_stat tmxr_detach_ln (TMLN *lp)
|
||||||
|
|
Loading…
Add table
Reference in a new issue